mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +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
16311f1d3c
commit
b0b0c3d943
1 changed files with 5 additions and 1 deletions
|
|
@ -99,7 +99,11 @@ in {
|
||||||
"/usr/share/terminfo" # package default, all distros
|
"/usr/share/terminfo" # package default, all distros
|
||||||
];
|
];
|
||||||
in {
|
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 =
|
TERMINFO_DIRS =
|
||||||
"${profileDirectory}/share/terminfo:$TERMINFO_DIRS\${TERMINFO_DIRS:+:}${distroTerminfoDirs}";
|
"${profileDirectory}/share/terminfo:$TERMINFO_DIRS\${TERMINFO_DIRS:+:}${distroTerminfoDirs}";
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue