nix.nixPath: Do not use environment.darwinConfig if set to null
I've personally set it to `null` to make my `system.primaryUser = null;` configuration work on a machine with `stateVersion = 4;`. It may apply in other use cases as well.
This commit is contained in:
parent
93562b65cf
commit
30845beee0
1 changed files with 8 additions and 5 deletions
|
|
@ -443,11 +443,14 @@ in
|
|||
nixPath = mkOption {
|
||||
type = nixPathType;
|
||||
inherit (managedDefault "nix.nixPath" (
|
||||
lib.optionals cfg.channel.enable [
|
||||
# Include default path <darwin-config>.
|
||||
{ darwin-config = "${config.environment.darwinConfig}"; }
|
||||
"/nix/var/nix/profiles/per-user/root/channels"
|
||||
]
|
||||
lib.optionals cfg.channel.enable (
|
||||
lib.optionals (config.environment.darwinConfig != null) [
|
||||
# Include default path <darwin-config>.
|
||||
{ darwin-config = "${config.environment.darwinConfig}"; }
|
||||
] ++ [
|
||||
"/nix/var/nix/profiles/per-user/root/channels"
|
||||
]
|
||||
)
|
||||
)) default;
|
||||
|
||||
defaultText = lib.literalExpression ''
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue