mirror of
https://github.com/nix-community/home-manager
synced 2024-11-26 21:19:45 +01:00
generic-linux: respect NIX_STATE_DIR
This commit is contained in:
parent
dc227b579d
commit
ecb93ab9ae
2 changed files with 3 additions and 2 deletions
|
@ -16,7 +16,8 @@ in {
|
|||
|
||||
config = mkIf config.targets.genericLinux.enable {
|
||||
home.sessionVariables = let
|
||||
profiles = [ "/nix/var/nix/profiles/default" profileDirectory ];
|
||||
profiles =
|
||||
[ "\${NIX_STATE_DIR:-/nix/var/nix}/profiles/default" profileDirectory ];
|
||||
dataDirs =
|
||||
concatStringsSep ":" (map (profile: "${profile}/share") profiles);
|
||||
in { XDG_DATA_DIRS = "${dataDirs}\${XDG_DATA_DIRS:+:}$XDG_DATA_DIRS"; };
|
||||
|
|
|
@ -10,7 +10,7 @@ with lib;
|
|||
assertFileExists home-path/etc/profile.d/hm-session-vars.sh
|
||||
assertFileContains \
|
||||
home-path/etc/profile.d/hm-session-vars.sh \
|
||||
'export XDG_DATA_DIRS="/nix/var/nix/profiles/default/share:/home/hm-user/.nix-profile/share''${XDG_DATA_DIRS:+:}$XDG_DATA_DIRS"'
|
||||
'export XDG_DATA_DIRS="''${NIX_STATE_DIR:-/nix/var/nix}/profiles/default/share:/home/hm-user/.nix-profile/share''${XDG_DATA_DIRS:+:}$XDG_DATA_DIRS"'
|
||||
assertFileContains \
|
||||
home-path/etc/profile.d/hm-session-vars.sh \
|
||||
'. "${pkgs.nix}/etc/profile.d/nix.sh"'
|
||||
|
|
Loading…
Reference in a new issue