{inputs, self, ...}: let inherit (inputs.nixpkgs) lib; isDirectory = _name: type: type == "directory"; hostNames = builtins.attrNames ( lib.filterAttrs isDirectory (builtins.readDir ./.) ); hosts = lib.genAttrs hostNames (name: { modules = [ (./. + "/${name}") ]; }); in { flake.nixosConfigurations = lib.mapAttrs (host: hostConfig: lib.nixosSystem { inherit (hostConfig) modules; system = "x86_64-linux"; specialArgs = { inherit inputs; }; }) hosts; }