2023-05-10 21:05:10 +02:00
|
|
|
{ lib, self, ... }:
|
|
|
|
let
|
2023-05-14 17:45:40 +02:00
|
|
|
entries = builtins.attrNames (builtins.readDir ./.);
|
|
|
|
configs = builtins.filter (dir: builtins.pathExists (./. + "/${dir}/configuration.nix")) entries;
|
|
|
|
in
|
|
|
|
{
|
|
|
|
flake.nixosConfigurations = lib.listToAttrs
|
|
|
|
(builtins.map
|
|
|
|
(name:
|
|
|
|
lib.nameValuePair
|
|
|
|
name
|
|
|
|
(lib.nixosSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
# Make flake available in modules
|
|
|
|
specialArgs = {
|
|
|
|
self = {
|
|
|
|
inputs = self.inputs;
|
|
|
|
nixosModules = self.nixosModules;
|
|
|
|
};
|
2023-05-10 21:05:10 +02:00
|
|
|
};
|
|
|
|
|
2023-05-14 17:45:40 +02:00
|
|
|
modules = [ (./. + "/${name}/configuration.nix") ];
|
|
|
|
}))
|
|
|
|
configs);
|
2023-05-10 21:05:10 +02:00
|
|
|
}
|