fix: dont double-apply overlays

previous behavior was that overlays were *implicitly* applied when i
imported nixpkgs, and then explicitly applied again later in the config.

for some reason i can't remove (or adjust?) the implicit application
without causing evals to hang w/o so much as any error message.
This commit is contained in:
2024-06-12 23:08:04 +00:00
parent 0d0fa8b37f
commit f1705686b8

View File

@@ -39,7 +39,13 @@ let
url = "https://github.com/NixOS/nixpkgs/archive/${lock'.rev}.tar.gz"; url = "https://github.com/NixOS/nixpkgs/archive/${lock'.rev}.tar.gz";
inherit (lock') sha256; inherit (lock') sha256;
}; };
unpatchedNixpkgs = import unpatchedSrc { inherit localSystem; }; commonNixpkgsArgs = {
inherit localSystem;
# reset impurities
config = {};
overlays = [];
};
unpatchedNixpkgs = import unpatchedSrc commonNixpkgsArgs;
patchedSrc = unpatchedNixpkgs.applyPatches { patchedSrc = unpatchedNixpkgs.applyPatches {
name = "nixpkgs-patched-uninsane"; name = "nixpkgs-patched-uninsane";
@@ -56,8 +62,7 @@ let
}; };
src = if doPatch then patchedSrc else { outPath = unpatchedSrc; }; src = if doPatch then patchedSrc else { outPath = unpatchedSrc; };
args = { args = commonNixpkgsArgs // {
inherit localSystem;
config = { config = {
allowUnfree = true; # NIXPKGS_ALLOW_UNFREE=1 allowUnfree = true; # NIXPKGS_ALLOW_UNFREE=1
allowBroken = true; # NIXPKGS_ALLOW_BROKEN=1 allowBroken = true; # NIXPKGS_ALLOW_BROKEN=1