mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-11 17:39:37 +08:00
bash: source session variable file directly
This commit is contained in:
@@ -265,7 +265,7 @@ in
|
||||
);
|
||||
|
||||
home.file.".profile".source = writeBashScript "profile" ''
|
||||
. "${config.home.profileDirectory}/etc/profile.d/hm-session-vars.sh"
|
||||
. "${config.home.sessionVariablesPackage}/etc/profile.d/hm-session-vars.sh"
|
||||
|
||||
${sessionVarsStr}
|
||||
|
||||
|
||||
@@ -14,9 +14,9 @@
|
||||
nmt.script = ''
|
||||
assertFileExists home-files/.profile
|
||||
assertFileContent \
|
||||
home-files/.profile \
|
||||
"$(normalizeStorePaths home-files/.profile)" \
|
||||
${builtins.toFile "session-variables-expected" ''
|
||||
. "/home/hm-user/.nix-profile/etc/profile.d/hm-session-vars.sh"
|
||||
. "/nix/store/00000000000000000000000000000000-hm-session-vars.sh/etc/profile.d/hm-session-vars.sh"
|
||||
|
||||
export V1="v1"
|
||||
export V2="v2-v1"
|
||||
|
||||
Reference in New Issue
Block a user