diff --git a/flake.nix b/flake.nix index 1d49bc86..d4ff1ccf 100644 --- a/flake.nix +++ b/flake.nix @@ -27,13 +27,17 @@ nixpkgs, ... } @ inputs: let - hosts = builtins.attrNames (builtins.readDir ./hosts); + inherit (self) outputs; + + hosts = builtins.filter (host: builtins.pathExists ./hosts/${host}/configuration.nix) (builtins.attrNames (builtins.readDir ./hosts)); + mkHostConfig = host: - import ./hosts/${host} { - inherit inputs; - hostname = host; - system = "x86_64-linux"; - pkgs = inputs.nixpkgs.legacyPackages."x86_64-linux"; + nixpkgs.lib.nixosSystem { + specialArgs = {inherit inputs outputs;}; + modules = [ + ./hosts/${host}/configuration.nix + ./hosts/${host}/hardware-configuration.nix + ]; }; in { nixosConfigurations = builtins.listToAttrs ( diff --git a/hosts/lilith-pad/default.nix b/hosts/lilith-pad/configuration.nix similarity index 100% rename from hosts/lilith-pad/default.nix rename to hosts/lilith-pad/configuration.nix