mirror of
https://github.com/nix-community/home-manager
synced 2024-11-14 07:09:45 +01:00
targets/generic-linux: use xdg path for defexpr
Fixes warnings about the non-existent `~/.nix-defexpr` folder when using `use-xdg-base-directories = true`. Example: warning: Nix search path entry '/home/user/.nix-defexpr/channels' does not exist, ignoring Starting Home Manager activation Activating checkFilesChanged Activating checkLinkTargets Activating writeBoundary Activating installPackages replacing old 'home-manager-path' installing 'home-manager-path' Activating dconfSettings Activating linkDesktopApplications Activating linkGeneration Cleaning up orphan links from /home/user No change so reusing latest profile generation 13 Creating home file links in /home/user Activating onFilesChange Activating reloadSystemd warning: Nix search path entry '/home/user/.nix-defexpr/channels' does not exist, ignoring
This commit is contained in:
parent
f16e7b5824
commit
8ea77d5efd
1 changed files with 5 additions and 1 deletions
|
@ -99,7 +99,11 @@ in {
|
|||
"/usr/share/terminfo" # package default, all distros
|
||||
];
|
||||
in {
|
||||
NIX_PATH = "$HOME/.nix-defexpr/channels\${NIX_PATH:+:}$NIX_PATH";
|
||||
NIX_PATH = if config.nix.enable
|
||||
&& (config.nix.settings.use-xdg-base-directories or false) then
|
||||
"${config.xdg.stateHome}/nix/defexpr/channels\${NIX_PATH:+:}$NIX_PATH"
|
||||
else
|
||||
"$HOME/.nix-defexpr/channels\${NIX_PATH:+:}$NIX_PATH";
|
||||
TERMINFO_DIRS =
|
||||
"${profileDirectory}/share/terminfo:$TERMINFO_DIRS\${TERMINFO_DIRS:+:}${distroTerminfoDirs}";
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue