From 839e915799c8223234e05fc946359f8265b0b21f Mon Sep 17 00:00:00 2001 From: Spectre Date: Fri, 7 Jun 2024 00:15:38 +0200 Subject: [PATCH] hosts --- flake.nix | 16 ++++++++++------ .../{default.nix => configuration.nix} | 0 2 files changed, 10 insertions(+), 6 deletions(-) rename hosts/lilith-pad/{default.nix => configuration.nix} (100%) 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