Environment variables: Difference between revisions
Add section re: builtins.getEnv |
fix outdated link |
||
Line 1: | Line 1: | ||
== Configuration of shell environment on NixOS == | == Configuration of shell environment on NixOS == | ||
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= | 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=unstable&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 (Pluggable Authentication Module). | <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). | ||