diff --git a/modules/services/misc/nix-daemon.nix b/modules/services/misc/nix-daemon.nix index 221ad6e1f543..1f95e63b64ac 100644 --- a/modules/services/misc/nix-daemon.nix +++ b/modules/services/misc/nix-daemon.nix @@ -226,7 +226,7 @@ in $extraOptions END ''; - target = "nix.conf"; # will be symlinked from /nix/etc/nix/nix.conf in activate-configuration.sh. + target = "nix/nix.conf"; } ] @@ -281,7 +281,7 @@ in nix.envVars = '' - export NIX_CONF_DIR=/nix/etc/nix + export NIX_CONF_DIR=/etc/nix # Enable the copy-from-other-stores substituter, which allows builds # to be sped up by copying build results from remote Nix stores. To @@ -306,8 +306,6 @@ in system.activationScripts.nix = stringAfter [ "etc" "users" ] '' # Set up Nix. - mkdir -p /nix/etc/nix - ln -sfn /etc/nix.conf /nix/etc/nix/nix.conf chown root.nixbld /nix/store chmod 1775 /nix/store diff --git a/modules/services/scheduling/cron.nix b/modules/services/scheduling/cron.nix index 9a81eb6e72c0..86ac32b94dca 100644 --- a/modules/services/scheduling/cron.nix +++ b/modules/services/scheduling/cron.nix @@ -12,7 +12,7 @@ let SHELL=${pkgs.bash}/bin/bash PATH=${config.system.path}/bin:${config.system.path}/sbin MAILTO="${config.services.cron.mailto}" - NIX_CONF_DIR=/nix/etc/nix + NIX_CONF_DIR=/etc/nix ${pkgs.lib.concatStrings (map (job: job + "\n") config.services.cron.systemCronJobs)} ''; diff --git a/modules/services/scheduling/fcron.nix b/modules/services/scheduling/fcron.nix index bf70bb657272..1dbaefdd7190 100644 --- a/modules/services/scheduling/fcron.nix +++ b/modules/services/scheduling/fcron.nix @@ -13,7 +13,7 @@ let SHELL=${pkgs.bash}/bin/bash PATH=${config.system.path}/bin:${config.system.path}/sbin MAILTO="${config.services.cron.mailto}" - NIX_CONF_DIR=/nix/etc/nix + NIX_CONF_DIR=/etc/nix ${pkgs.lib.concatStrings (map (job: job + "\n") config.services.cron.systemCronJobs)} '';