-
Notifications
You must be signed in to change notification settings - Fork 1
/
flake.nix
33 lines (30 loc) · 1.22 KB
/
flake.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
{
description = "A collection of Nix flakes";
inputs.custom = { type = "github"; owner = "eadwu"; repo = "flakes"; ref = "custom"; inputs.nixpkgs.follows = "/nixpkgs"; };
inputs.rolling = { type = "github"; owner = "eadwu"; repo = "flakes"; ref = "rolling"; inputs.nixpkgs.follows = "/nixpkgs"; };
inputs.srcs = { type = "github"; owner = "eadwu"; repo = "flakes"; ref = "src"; inputs.nixpkgs.follows = "/nixpkgs"; };
outputs = { self, nixpkgs, ... }@inputs: with nixpkgs.lib; let
targetInputs = removeAttrs inputs [ "self" "nixpkgs" ];
in
(foldl' recursiveUpdate { } (builtins.attrValues (builtins.mapAttrs (_: v: v.outputs) targetInputs)))
// {
overlay = foldl' (final': prev': composeExtensions final' prev') (final: prev: { }) (builtins.attrValues self.overlays);
overlays =
foldl' recursiveUpdate { } (
builtins.attrValues (
mapAttrs
(
n: v:
mapAttrs'
(n': v': nameValuePair "${n}-${n'}" v')
v.overlays
)
targetInputs
)
);
nixosConfigurations.hosts = nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [ self.nixosModules.adblock ];
};
};
}