diff --git a/modules/system/etc/etc.nix b/modules/system/etc/etc.nix index ce7fc543536..91fcdcf2435 100644 --- a/modules/system/etc/etc.nix +++ b/modules/system/etc/etc.nix @@ -6,7 +6,7 @@ with pkgs.lib; let - etc' = attrValues config.environment.etc; + etc' = filter (f: f.enable) (attrValues config.environment.etc); etc = pkgs.stdenv.mkDerivation { name = "etc"; @@ -46,6 +46,15 @@ in options = singleton ({ name, config, ... }: { 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 { description = '' Name of symlink (relative to