mirror of
https://github.com/nix-community/home-manager
synced 2024-11-23 19:49:45 +01:00
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
1 changed files with 17 additions and 0 deletions
|
@ -267,6 +267,23 @@ in
|
||||||
//
|
//
|
||||||
(maybeSet "LC_TIME" cfg.language.time);
|
(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
|
# A dummy entry acting as a boundary between the activation
|
||||||
# script's "check" and the "write" phases.
|
# script's "check" and the "write" phases.
|
||||||
home.activation.writeBoundary = dag.entryAnywhere "";
|
home.activation.writeBoundary = dag.entryAnywhere "";
|
||||||
|
|
Loading…
Reference in a new issue