From fec907a1174ad5c28a00e982400921c357401076 Mon Sep 17 00:00:00 2001 From: Zynh Ludwig Date: Fri, 28 Jun 2024 08:06:07 -0700 Subject: [PATCH] more formatting --- flake.nix | 31 ++++++++++++------------------- 1 file changed, 12 insertions(+), 19 deletions(-) diff --git a/flake.nix b/flake.nix index 035f773..4dd63e7 100644 --- a/flake.nix +++ b/flake.nix @@ -24,32 +24,25 @@ let lib = import ./lib { inherit (nixpkgs) lib; }; - cleanHostname = - config: - builtins.removeAttrs config [ "hostname" ]; - toPartialNixosConfigSet = - config: - { - name = config.hostname; - value = nixpkgs.lib.nixosSystem (cleanHostname config); - }; - toNixosSystemConfig = + toPartialNixosConfig = { hostname, system }: { - inherit system hostname; - specialArgs = { inherit inputs; }; - modules = [ - ./hosts/${hostname}/hardware-configuration.nix - ./hosts/${hostname}/configuration.nix - inputs.home-manager.nixosModules.default - ]; + name = hostname; + value = nixpkgs.lib.nixosSystem { + inherit system; + specialArgs = { inherit inputs; }; + modules = [ + ./hosts/${hostname}/hardware-configuration.nix + ./hosts/${hostname}/configuration.nix + inputs.home-manager.nixosModules.default + ]; + }; }; compileSystems = systems: lib.right builtins.listToAttrs - (map toPartialNixosConfigSet) - (map toNixosSystemConfig) + (map toPartialNixosConfig) systems; in compileSystems