diff options
author | Robert Helgesson <robert@rycee.net> | 2020-06-17 23:33:13 +0200 |
---|---|---|
committer | Robert Helgesson <robert@rycee.net> | 2020-07-14 23:31:20 +0200 |
commit | a49ce0e9edcd717ce6e66041aabd656c02903904 (patch) | |
tree | 7016517eb1ba3ba9f3083af26500067efd889a66 /nixos | |
parent | 1a8ab9d9deeb222716f9544a67ea19d1a7a43bbd (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 'nixos')
-rw-r--r-- | nixos/default.nix | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/nixos/default.nix b/nixos/default.nix index bb0e534ab3e..9aedf618c51 100644 --- a/nixos/default.nix +++ b/nixos/default.nix @@ -88,6 +88,8 @@ in { (mapAttrs (username: usercfg: { packages = [ usercfg.home.path ]; }) cfg.users); + environment.pathsToLink = mkIf cfg.useUserPackages [ "/etc/profile.d" ]; + systemd.services = mapAttrs' (_: usercfg: let username = usercfg.home.username; in nameValuePair ("home-manager-${utils.escapeSystemdPath username}") { |