From d3941dc5ecbb1582fa6df90283f072bd8c1f2134 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Sun, 1 Oct 2017 16:26:13 +0200 Subject: [PATCH] nix: use old default for nix.nixPath with system.stateVersion = 1 --- CHANGELOG | 3 ++- modules/nix/default.nix | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index c2bf302b..d3d1d6f5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -11,7 +11,8 @@ programs.nix-index.enable = true; 2017-07-23 -- darwin entry in the default nix.nixPath was removed +- darwin entry in the default nix.nixPath was removed for + system.stateVersion > 1 Use a channel for nix-darwin or configure nix.nixPath diff --git a/modules/nix/default.nix b/modules/nix/default.nix index eea899c2..c8267130 100644 --- a/modules/nix/default.nix +++ b/modules/nix/default.nix @@ -304,6 +304,12 @@ in nix.binaryCaches = mkAfter [ https://cache.nixos.org/ ]; nix.binaryCachePublicKeys = mkAfter [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" ]; + nix.nixPath = mkIf (config.system.stateVersion < 2) (mkDefault + [ "darwin=$HOME/.nix-defexpr/darwin" + "darwin-config=$HOME/.nixpkgs/darwin-configuration.nix" + "/nix/var/nix/profiles/per-user/root/channels" + ]); + environment.etc."nix/nix.conf".source = nixConf; # List of machines for distributed Nix builds in the format