mirror of
https://github.com/nix-community/home-manager
synced 2024-11-26 21:19:45 +01:00
home-environment: prepend to PATH in sessionPath
This makes the options behave as people expect it to: one's personal configuration can shadow system executables. Closes #3324.
This commit is contained in:
parent
993fb02d20
commit
e5471d3145
2 changed files with 2 additions and 2 deletions
|
@ -556,7 +556,7 @@ in
|
||||||
|
|
||||||
${config.lib.shell.exportAll cfg.sessionVariables}
|
${config.lib.shell.exportAll cfg.sessionVariables}
|
||||||
'' + lib.optionalString (cfg.sessionPath != [ ]) ''
|
'' + lib.optionalString (cfg.sessionPath != [ ]) ''
|
||||||
export PATH="$PATH''${PATH:+:}${concatStringsSep ":" cfg.sessionPath}"
|
export PATH="${concatStringsSep ":" cfg.sessionPath}''${PATH:+:}$PATH"
|
||||||
'' + cfg.sessionVariablesExtra;
|
'' + cfg.sessionVariablesExtra;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,6 @@
|
||||||
hmSessVars=home-path/etc/profile.d/hm-session-vars.sh
|
hmSessVars=home-path/etc/profile.d/hm-session-vars.sh
|
||||||
assertFileExists $hmSessVars
|
assertFileExists $hmSessVars
|
||||||
assertFileContains $hmSessVars \
|
assertFileContains $hmSessVars \
|
||||||
'export PATH="$PATH''${PATH:+:}bar:baz:foo"'
|
'export PATH="bar:baz:foo''${PATH:+:}$PATH"'
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue