module(nix): Config flake inputs as nix registry
This commit is contained in:
parent
c8f57642db
commit
9317743571
1 changed files with 15 additions and 8 deletions
|
|
@ -7,6 +7,12 @@
|
||||||
...
|
...
|
||||||
}: {
|
}: {
|
||||||
config = {
|
config = {
|
||||||
|
environment.etc =
|
||||||
|
inputs
|
||||||
|
|> lib.mapAttrs' (name: value:
|
||||||
|
lib.nameValuePair "nix/inputs/${name}" {
|
||||||
|
source = value;
|
||||||
|
});
|
||||||
nixpkgs = {
|
nixpkgs = {
|
||||||
config = {
|
config = {
|
||||||
allowUnfree = true;
|
allowUnfree = true;
|
||||||
|
|
@ -23,7 +29,7 @@
|
||||||
mode = "0444";
|
mode = "0444";
|
||||||
};
|
};
|
||||||
nix = {
|
nix = {
|
||||||
nixPath = ["nixpkgs=${inputs.nixpkgs}"];
|
nixPath = ["/etc/nix/inputs"];
|
||||||
extraOptions = ''
|
extraOptions = ''
|
||||||
!include ${config.sops.secrets."access-tokens".path}
|
!include ${config.sops.secrets."access-tokens".path}
|
||||||
'';
|
'';
|
||||||
|
|
@ -54,13 +60,14 @@
|
||||||
builders-use-substitutes = true;
|
builders-use-substitutes = true;
|
||||||
};
|
};
|
||||||
package = pkgs.nix;
|
package = pkgs.nix;
|
||||||
registry.sys = lib.mkDefault {
|
registry =
|
||||||
from = {
|
inputs
|
||||||
type = "indirect";
|
|> lib.filterAttrs (name: _value: name != "nixpkgs")
|
||||||
id = "sys";
|
|> lib.mapAttrs (_name: value: {
|
||||||
};
|
flake = lib.mkForce {
|
||||||
flake = inputs.nixpkgs;
|
outPath = value;
|
||||||
};
|
};
|
||||||
|
});
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue