diff --git a/modules/home-environment.nix b/modules/home-environment.nix index f2936415..61ca0649 100644 --- a/modules/home-environment.nix +++ b/modules/home-environment.nix @@ -127,6 +127,25 @@ in example = { EDITOR = "emacs"; GS_OPTIONS = "-sPAPERSIZE=a4"; }; description = '' Environment variables to always set at login. + + 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 + + home.sessionVariables = { + FOO = "Hello"; + BAR = "$FOO World!"; + }; + + may not work as expected. If you need to reference another + session variable, then do so inside Nix instead. The above + example then becomes + + home.sessionVariables = { + FOO = "Hello"; + BAR = "''${config.home.sessionVariables.FOO} World!"; + }; + ''; };