home-environment: install hm-session-vars.sh
file
This is a file containing all session variables exported using a Bourne-compatible syntax.
This commit is contained in:
parent
2fc1b9b5e0
commit
e624b9aa6a
|
@ -267,6 +267,23 @@ in
|
|||
//
|
||||
(maybeSet "LC_TIME" cfg.language.time);
|
||||
|
||||
home.packages = [
|
||||
# Provide a file holding all session variables.
|
||||
(
|
||||
pkgs.writeTextFile {
|
||||
name = "hm-session-vars.sh";
|
||||
destination = "/etc/profile.d/hm-session-vars.sh";
|
||||
text = ''
|
||||
# Only source this once.
|
||||
if [ -n "$__HM_SESS_VARS_SOURCED" ]; then return; fi
|
||||
export __HM_SESS_VARS_SOURCED=1
|
||||
|
||||
${config.lib.shell.exportAll cfg.sessionVariables}
|
||||
'';
|
||||
}
|
||||
)
|
||||
];
|
||||
|
||||
# A dummy entry acting as a boundary between the activation
|
||||
# script's "check" and the "write" phases.
|
||||
home.activation.writeBoundary = dag.entryAnywhere "";
|
||||
|
|
Loading…
Reference in a new issue