Merge pull request #128271 from Kreyren/localBinInPath
This commit is contained in:
commit
28acaac96f
@ -126,6 +126,14 @@ in
|
|||||||
type = types.bool;
|
type = types.bool;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
environment.localBinInPath = mkOption {
|
||||||
|
description = ''
|
||||||
|
Add ~/.local/bin/ to $PATH
|
||||||
|
'';
|
||||||
|
default = false;
|
||||||
|
type = types.bool;
|
||||||
|
};
|
||||||
|
|
||||||
environment.binsh = mkOption {
|
environment.binsh = mkOption {
|
||||||
default = "${config.system.build.binsh}/bin/sh";
|
default = "${config.system.build.binsh}/bin/sh";
|
||||||
defaultText = "\${config.system.build.binsh}/bin/sh";
|
defaultText = "\${config.system.build.binsh}/bin/sh";
|
||||||
@ -198,6 +206,10 @@ in
|
|||||||
# ~/bin if it exists overrides other bin directories.
|
# ~/bin if it exists overrides other bin directories.
|
||||||
export PATH="$HOME/bin:$PATH"
|
export PATH="$HOME/bin:$PATH"
|
||||||
''}
|
''}
|
||||||
|
|
||||||
|
${optionalString cfg.localBinInPath ''
|
||||||
|
export PATH="$HOME/.local/bin:$PATH"
|
||||||
|
''}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
system.activationScripts.binsh = stringAfter [ "stdio" ]
|
system.activationScripts.binsh = stringAfter [ "stdio" ]
|
||||||
|
Loading…
Reference in New Issue
Block a user