nix.nixPath: Do not use environment.darwinConfig if set to null (#1469)

This commit is contained in:
Sam 2025-06-22 18:56:08 +00:00 committed by GitHub
commit 1dd19f19e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 ''