fix: nixpkgs' are paths

This commit is contained in:
catvayor 2024-12-14 14:48:58 +01:00
parent 237f5efb85
commit cd2ef49dd9
Signed by: lbailly
GPG key ID: CE3E645251AC63F3

View file

@ -5,22 +5,22 @@ let
inherit (import sources.nix-patches { patchFile = ./patches; }) mkNixpkgsSrc;
unstable = {
nixpkgs = import (mkNixpkgsSrc {
nixpkgs = mkNixpkgsSrc {
src = sources.nixpkgs-unstable;
version = "unstable";
}) { };
};
home-manager = "${sources.home-manager-unstable}/nixos";
nixvim = import sources.nixvim-unstable;
};
stable = {
nixpkgs = import (mkNixpkgsSrc {
nixpkgs = mkNixpkgsSrc {
src = sources.nixpkgs-stable;
version = "stable";
}) { };
};
home-manager = "${sources.home-manager-stable}/nixos";
nixvim = import sources.nixvim-stable;
};
inherit (unstable.nixpkgs) lib;
inherit (import unstable.nixpkgs { }) lib;
nodes = lib.mapAttrs' (name: _: {
name = lib.removeSuffix ".nix" name;
@ -43,16 +43,16 @@ in
_: node:
lib.foldl (
pkgs: patch:
import (mkNixpkgsSrc {
mkNixpkgsSrc {
src = pkgs;
version = patch;
}) { }
) (if node.unstable then unstable else stable).nixpkgs (node.nixPatches or [])
}
) (if node.unstable then unstable else stable).nixpkgs (node.nixPatches or [ ])
) nodes-meta;
nodeSpecialArgs = lib.mapAttrs (name: node: {
inherit (node) unstable;
self-version = (if node.unstable then unstable else stable) // {
nixpkgs = nodeNixpkgs."${name}";
nixpkgs = nodeNixpkgs.${name};
};
}) nodes-meta;
};