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 = {
|
||||
environment.etc =
|
||||
inputs
|
||||
|> lib.mapAttrs' (name: value:
|
||||
lib.nameValuePair "nix/inputs/${name}" {
|
||||
source = value;
|
||||
});
|
||||
nixpkgs = {
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
|
|
@ -23,7 +29,7 @@
|
|||
mode = "0444";
|
||||
};
|
||||
nix = {
|
||||
nixPath = ["nixpkgs=${inputs.nixpkgs}"];
|
||||
nixPath = ["/etc/nix/inputs"];
|
||||
extraOptions = ''
|
||||
!include ${config.sops.secrets."access-tokens".path}
|
||||
'';
|
||||
|
|
@ -54,13 +60,14 @@
|
|||
builders-use-substitutes = true;
|
||||
};
|
||||
package = pkgs.nix;
|
||||
registry.sys = lib.mkDefault {
|
||||
from = {
|
||||
type = "indirect";
|
||||
id = "sys";
|
||||
};
|
||||
flake = inputs.nixpkgs;
|
||||
};
|
||||
registry =
|
||||
inputs
|
||||
|> lib.filterAttrs (name: _value: name != "nixpkgs")
|
||||
|> lib.mapAttrs (_name: value: {
|
||||
flake = lib.mkForce {
|
||||
outPath = value;
|
||||
};
|
||||
});
|
||||
};
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue