mirror of
https://github.com/nix-community/home-manager
synced 2024-11-16 16:19:44 +01:00
home-environment: describe session variable trickyness
This commit is contained in:
parent
8ab6298f30
commit
33af9948e5
1 changed files with 19 additions and 0 deletions
|
@ -127,6 +127,25 @@ in
|
||||||
example = { EDITOR = "emacs"; GS_OPTIONS = "-sPAPERSIZE=a4"; };
|
example = { EDITOR = "emacs"; GS_OPTIONS = "-sPAPERSIZE=a4"; };
|
||||||
description = ''
|
description = ''
|
||||||
Environment variables to always set at login.
|
Environment variables to always set at login.
|
||||||
|
</para><para>
|
||||||
|
Note, these variables may be set in any order so no session
|
||||||
|
variable may have a runtime dependency on another session
|
||||||
|
variable. In particular code like
|
||||||
|
<programlisting>
|
||||||
|
home.sessionVariables = {
|
||||||
|
FOO = "Hello";
|
||||||
|
BAR = "$FOO World!";
|
||||||
|
};
|
||||||
|
</programlisting>
|
||||||
|
may not work as expected. If you need to reference another
|
||||||
|
session variable, then do so inside Nix instead. The above
|
||||||
|
example then becomes
|
||||||
|
<programlisting>
|
||||||
|
home.sessionVariables = {
|
||||||
|
FOO = "Hello";
|
||||||
|
BAR = "''${config.home.sessionVariables.FOO} World!";
|
||||||
|
};
|
||||||
|
</programlisting>
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue