This option allows adding additional entries to `PATH`.wip/yesman
parent
9ff2188c5d
commit
0006da1381
@ -1,3 +1,4 @@ |
||||
{ |
||||
home-session-variables = ./session-variables.nix; |
||||
home-session-path = ./session-path.nix; |
||||
} |
||||
|
@ -0,0 +1,27 @@ |
||||
{ config, lib, pkgs, ... }: |
||||
|
||||
{ |
||||
imports = [ |
||||
({ ... }: { config.home.sessionPath = [ "foo" ]; }) |
||||
({ ... }: { config.home.sessionPath = [ "bar" "baz" ]; }) |
||||
]; |
||||
|
||||
nmt.script = '' |
||||
assertFileExists home-path/etc/profile.d/hm-session-vars.sh |
||||
assertFileContent \ |
||||
home-path/etc/profile.d/hm-session-vars.sh \ |
||||
${ |
||||
pkgs.writeText "session-path-expected.txt" '' |
||||
# Only source this once. |
||||
if [ -n "$__HM_SESS_VARS_SOURCED" ]; then return; fi |
||||
export __HM_SESS_VARS_SOURCED=1 |
||||
|
||||
export XDG_CACHE_HOME="/home/hm-user/.cache" |
||||
export XDG_CONFIG_HOME="/home/hm-user/.config" |
||||
export XDG_DATA_HOME="/home/hm-user/.local/share" |
||||
export PATH="$PATH''${PATH:+:}bar:baz:foo" |
||||
'' |
||||
} |
||||
''; |
||||
|
||||
} |
Loading…
Reference in new issue