Selectively allow /etc files to be disabled
For instance, if you don't want NixOS to emit /etc/hosts, you can say: environment.etc.hosts.enable = false;
This commit is contained in:
parent
1daab1ebf5
commit
979117b6b8
@ -6,7 +6,7 @@ with pkgs.lib;
|
|||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
etc' = attrValues config.environment.etc;
|
etc' = filter (f: f.enable) (attrValues config.environment.etc);
|
||||||
|
|
||||||
etc = pkgs.stdenv.mkDerivation {
|
etc = pkgs.stdenv.mkDerivation {
|
||||||
name = "etc";
|
name = "etc";
|
||||||
@ -46,6 +46,15 @@ in
|
|||||||
options = singleton ({ name, config, ... }:
|
options = singleton ({ name, config, ... }:
|
||||||
{ options = {
|
{ options = {
|
||||||
|
|
||||||
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
description = ''
|
||||||
|
Whether this /etc file should be generated. This
|
||||||
|
option allows specific /etc files to be disabled.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
target = mkOption {
|
target = mkOption {
|
||||||
description = ''
|
description = ''
|
||||||
Name of symlink (relative to
|
Name of symlink (relative to
|
||||||
|
Loading…
x
Reference in New Issue
Block a user