diff options
| author | Daiderd Jordan <daiderd@gmail.com> | 2018-08-26 14:09:01 +0200 |
|---|---|---|
| committer | Daiderd Jordan <daiderd@gmail.com> | 2018-08-26 14:09:01 +0200 |
| commit | f473b21c9fbb6b9af0400442448e44514d44a452 (patch) | |
| tree | d222543ea61704fa8aa44ae425a00390cd2c42d6 /modules/environment/default.nix | |
| parent | 483a906c907ab7c8901131d5a407f3335b8e2e44 (diff) | |
environment: add darwinConfig option to set darwin-config in NIX_PATH
This simplifies using a non default configuration.nix without requiring
a symlink or redefining NIX_PATH.
The nix.nixPath option only defines a default which means defining a value
will drop all of the defaults. This is because correct merge behaviour
isn't very clear for named entries.
Diffstat (limited to 'modules/environment/default.nix')
| -rw-r--r-- | modules/environment/default.nix | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/environment/default.nix b/modules/environment/default.nix index 3ab0756..6d77cd6 100644 --- a/modules/environment/default.nix +++ b/modules/environment/default.nix @@ -63,6 +63,19 @@ in { description = "List of directories to be symlinked in <filename>/run/current-system/sw</filename>."; }; + environment.darwinConfig = mkOption { + type = types.either types.path types.str; + default = "$HOME/.nixpkgs/darwin-configuration.nix"; + description = '' + The path of the darwin configuration.nix used to configure the system, + this updates the default darwin-config entry in NIX_PATH. Since this + changes an environment variable it will only apply to new shells. + + NOTE: Changing this requires running <command>darwin-rebuild switch -I darwin-config=/path/to/configuration.nix</command> + the first time to make darwin-rebuild aware of the custom location. + ''; + }; + environment.loginShell = mkOption { type = types.str; default = "$SHELL"; |
