mirror of
https://github.com/nix-community/home-manager.git
synced 2025-04-15 08:46:52 +00:00
home-environment: Stop exporting __HM_SESS_VARS_SOURCED
If the __HM_SESS_VARS_SOURCED is set in environment of parent process, then the spawned child shell will inherit it, and won't set the session variables one expects to be set in their home environment And, I don't see any need for exporting environment variable, just setting it is enough for it to be a guard.
This commit is contained in:
parent
0912d26b30
commit
32d4829d3f
3 changed files with 4 additions and 4 deletions
|
@ -552,7 +552,7 @@ in
|
|||
text = ''
|
||||
# Only source this once.
|
||||
if [ -n "$__HM_SESS_VARS_SOURCED" ]; then return; fi
|
||||
export __HM_SESS_VARS_SOURCED=1
|
||||
__HM_SESS_VARS_SOURCED=1
|
||||
|
||||
${config.lib.shell.exportAll cfg.sessionVariables}
|
||||
'' + lib.optionalString (cfg.sessionPath != [ ]) ''
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# Only source this once.
|
||||
if [ -n "$__HM_SESS_VARS_SOURCED" ]; then return; fi
|
||||
export __HM_SESS_VARS_SOURCED=1
|
||||
__HM_SESS_VARS_SOURCED=1
|
||||
@exportLocaleVar@
|
||||
export V1="v1"
|
||||
export V2="v2-v1"
|
||||
|
|
|
@ -7,7 +7,7 @@ let
|
|||
linuxExpected = ''
|
||||
# Only source this once.
|
||||
if [ -n "$__HM_SESS_VARS_SOURCED" ]; then return; fi
|
||||
export __HM_SESS_VARS_SOURCED=1
|
||||
__HM_SESS_VARS_SOURCED=1
|
||||
|
||||
export LOCALE_ARCHIVE_2_27="${config.i18n.glibcLocales}/lib/locale/locale-archive"
|
||||
export V1="v1"
|
||||
|
@ -21,7 +21,7 @@ let
|
|||
darwinExpected = ''
|
||||
# Only source this once.
|
||||
if [ -n "$__HM_SESS_VARS_SOURCED" ]; then return; fi
|
||||
export __HM_SESS_VARS_SOURCED=1
|
||||
__HM_SESS_VARS_SOURCED=1
|
||||
|
||||
export V1="v1"
|
||||
export V2="v2-v1"
|
||||
|
|
Loading…
Add table
Reference in a new issue