From cd83178489bdc1990d071b1f9b1a9e35c1a2faac Mon Sep 17 00:00:00 2001 From: seth Date: Wed, 30 Oct 2024 21:20:07 -0400 Subject: modules/nix: use path over flake for nixpkgs in `$NIX_PATH` --- modules/shared/defaults/nix.nix | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'modules') diff --git a/modules/shared/defaults/nix.nix b/modules/shared/defaults/nix.nix index e5d7607..f15d81c 100644 --- a/modules/shared/defaults/nix.nix +++ b/modules/shared/defaults/nix.nix @@ -34,9 +34,16 @@ in automatic = lib.mkDefault true; options = lib.mkDefault "--delete-older-than 2d"; }; + + # See comment below + nixPath = [ "nixpkgs=${config.nixpkgs.flake.source}" ]; }; - nixpkgs.config.allowUnfree = lib.mkDefault true; + nixpkgs = { + config.allowUnfree = lib.mkDefault true; + # The `flake:` syntax in `$NIX_PATH` seems to do some weird copying on Nix 2.24 + flake.setNixPath = false; + }; } (lib.mkIf hasReplFlake { -- cgit v1.2.3