Environment variables: Difference between revisions
imported>Symys m Tweaked formatting. |
m acronyms should have in page definition Tags: Mobile edit Mobile web edit |
||
Line 2: | Line 2: | ||
Environment variables can be set with [https://search.nixos.org/options?channel=unstable&show=environment.variables&from=0&size=50&sort=relevance&type=packages&query=environment.variables environment.variables ], [https://search.nixos.org/options?channel=23.11&show=environment.sessionVariables&from=0&size=50&sort=relevance&type=packages&query=environment.sessionVariables environment.sessionVariables ], and [https://search.nixos.org/options?channel=unstable&show=environment.profileRelativeSessionVariables&from=0&size=50&sort=relevance&type=packages&query=environment.profileRelativeSessionVariables environment.profileRelativeSessionVariables ] . | Environment variables can be set with [https://search.nixos.org/options?channel=unstable&show=environment.variables&from=0&size=50&sort=relevance&type=packages&query=environment.variables environment.variables ], [https://search.nixos.org/options?channel=23.11&show=environment.sessionVariables&from=0&size=50&sort=relevance&type=packages&query=environment.sessionVariables environment.sessionVariables ], and [https://search.nixos.org/options?channel=unstable&show=environment.profileRelativeSessionVariables&from=0&size=50&sort=relevance&type=packages&query=environment.profileRelativeSessionVariables environment.profileRelativeSessionVariables ] . | ||
<code>environment.variables</code> are global variables set on shell initialization, whereas <code>environment.sessionVariables</code> and <code>environment.profileRelativeSessionVariables</code> are initialized through PAM. | <code>environment.variables</code> are global variables set on shell initialization, whereas <code>environment.sessionVariables</code> and <code>environment.profileRelativeSessionVariables</code> are initialized through PAM (Pluggable Authentication Module). | ||
For example, for the [https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html#variables XDG Base Directory Specification], the following could be set to <code>/etc/nixos/configuration.nix</code>: | For example, for the [https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html#variables XDG Base Directory Specification], the following could be set to <code>/etc/nixos/configuration.nix</code>: |