blob: cdf26eb9471e0974d58e2a0ae1872600ca834d51 (
plain)
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
|
{
config,
lib,
inputs,
...
}:
{
flake.nixosConfigurations =
let
hosts = builtins.attrNames (
lib.attrsets.filterAttrs (_: type: type == "directory") (builtins.readDir ./.)
);
mkNixosConfiguration = host: {
name = host;
value = inputs.nixpkgs.lib.nixosSystem {
modules = [
# keep-sorted start
config.flake.modules.nixos."${host}"
inputs.disko.nixosModules.default
# keep-sorted end
];
};
};
in
builtins.listToAttrs (map mkNixosConfiguration hosts);
}
|