-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.nix
45 lines (45 loc) · 1.19 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
let
flakeLock = builtins.fromJSON (builtins.readFile ./flake.lock);
nixpkgs = builtins.fetchTree flakeLock.nodes.nixpkgs.locked;
sops-nix = builtins.fetchTree flakeLock.nodes.sops-nix.locked;
disko = builtins.fetchTree flakeLock.nodes.disko.locked;
in
{
overlays ? [ ],
config ? { },
...
}@args:
(import nixpkgs.outPath) (
{
overlays = [
(import ./pkgs/default.nix {
lib = (import "${nixpkgs.outPath}/lib").extend (import ./lib/overlay.nix { inherit nixpkgs; });
outPath = ./.;
})
(
final: prev:
let
localPkgs = import "${sops-nix}/default.nix" { pkgs = final; };
in
{
inherit (localPkgs)
sops-install-secrets
sops-init-gpg-key
sops-pgp-hook
sops-import-keys-hook
sops-ssh-to-age
;
# backward compatibility
inherit (prev) ssh-to-pgp;
}
)
(f: p: {
disko = p.callPackage "${disko}/package.nix" { };
disko-install = f.disko.overrideAttrs (_old: {
name = "disko-install";
});
})
] ++ args.overlays or [ ];
}
// builtins.removeAttrs args [ "overlays" ]
)