feat: more nixPath pins
This commit is contained in:
parent
c456490501
commit
4ec35dcd2b
1 changed files with 5 additions and 4 deletions
|
@ -4,9 +4,10 @@
|
||||||
pkgs,
|
pkgs,
|
||||||
...
|
...
|
||||||
}: let
|
}: let
|
||||||
|
inherit (builtins) attrValues mapAttrs;
|
||||||
inherit (lib) filterAttrs;
|
inherit (lib) filterAttrs;
|
||||||
inherit (pkgs.stdenv) isDarwin isLinux;
|
inherit (pkgs.stdenv) isDarwin isLinux;
|
||||||
flakes = filterAttrs (name: value: value ? outputs) inputs;
|
flakeInputs = filterAttrs (name: value: (value ? outputs) && (name != "self")) inputs;
|
||||||
in {
|
in {
|
||||||
nixpkgs.config.allowUnfree = true;
|
nixpkgs.config.allowUnfree = true;
|
||||||
nix = {
|
nix = {
|
||||||
|
@ -21,12 +22,12 @@ in {
|
||||||
warn-dirty = false;
|
warn-dirty = false;
|
||||||
}
|
}
|
||||||
// (import ../../../flake.nix).nixConfig;
|
// (import ../../../flake.nix).nixConfig;
|
||||||
registry = builtins.mapAttrs (name: v: {flake = v;}) flakes;
|
registry = mapAttrs (name: v: {flake = v;}) flakeInputs;
|
||||||
nixPath =
|
nixPath =
|
||||||
if isDarwin
|
if isDarwin
|
||||||
then lib.mkForce [{nixpkgs = "${inputs.nixpkgs.outPath}";}]
|
then lib.mkForce (mapAttrs (k: v: v.outPath) flakeInputs)
|
||||||
else if isLinux
|
else if isLinux
|
||||||
then ["nixpkgs=${inputs.nixpkgs.outPath}"]
|
then attrValues (mapAttrs (k: v: "${k}=${v.outPath}") flakeInputs)
|
||||||
else throw "Unsupported platform";
|
else throw "Unsupported platform";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue