diff --git a/system/options.nix b/system/options.nix index 4249065239c..d60a99d470a 100644 --- a/system/options.nix +++ b/system/options.nix @@ -592,7 +592,6 @@ in # then the checking in upstart-jobs/default.nix can be removed again (together with passing arg optionDeclarations) }; - services = { @@ -3008,6 +3007,20 @@ root ALL=(ALL) SETENV: ALL "; }; + # should be moved to etc/default.nix + etc = mkOption { + default = []; + example = [ + { source = "/nix/store/.../etc/dir/file.conf.example"; + target = "dir/file.conf"; + mode = "0440"; + } + ]; + description = " + List of files that have to be linked in /etc. + "; + }; + nix = mkOption { default = pkgs.nixUnstable; example = pkgs.nixCustomFun /root/nix.tar.gz; diff --git a/system/system.nix b/system/system.nix index 95b85a83da2..d0d1946038a 100644 --- a/system/system.nix +++ b/system/system.nix @@ -116,7 +116,9 @@ rec { etc = import ../etc/default.nix { inherit config pkgs upstartJobs systemPath wrapperDir defaultShell nixEnvVars modulesTree nssModulesPath; - extraEtc = pkgs.lib.concatLists (map (job: job.extraEtc) upstartJobs.jobs); + extraEtc = + (pkgs.lib.concatLists (map (job: job.extraEtc) upstartJobs.jobs)) + ++ config.environment.etc; };