aboutsummaryrefslogtreecommitdiff
path: root/nix-darwin
diff options
context:
space:
mode:
authorRobert Helgesson <robert@rycee.net>2020-06-17 23:33:13 +0200
committerRobert Helgesson <robert@rycee.net>2020-07-14 23:31:20 +0200
commita49ce0e9edcd717ce6e66041aabd656c02903904 (patch)
tree7016517eb1ba3ba9f3083af26500067efd889a66 /nix-darwin
parent1a8ab9d9deeb222716f9544a67ea19d1a7a43bbd (diff)
home-environment: use per-user profile path in /etc
Before the profile directory value would point directly to the build output in the Nix store. Unfortunately this would cause an infinite loop if the user's configuration directly or indirectly refers to the profile directory value. Fixes #1188
Diffstat (limited to 'nix-darwin')
-rw-r--r--nix-darwin/default.nix2
1 files changed, 2 insertions, 0 deletions
diff --git a/nix-darwin/default.nix b/nix-darwin/default.nix
index 4b226d44322..ce6105d4b12 100644
--- a/nix-darwin/default.nix
+++ b/nix-darwin/default.nix
@@ -72,6 +72,8 @@ in
}) cfg.users
);
+ environment.pathsToLink = mkIf cfg.useUserPackages [ "/etc/profile.d" ];
+
system.activationScripts.postActivation.text =
concatStringsSep "\n" (mapAttrsToList (username: usercfg: ''
echo Activating home-manager configuration for ${username}