formatting?

This commit is contained in:
Zynh Ludwig 2024-06-28 07:55:01 -07:00
parent 608982d8f2
commit 7486f2409b

View file

@ -24,17 +24,26 @@
let let
lib = import ./lib { inherit (nixpkgs) lib; }; lib = import ./lib { inherit (nixpkgs) lib; };
cleanHostname = config: builtins.removeAttrs config [ "hostname" ]; cleanHostname =
toPartialNixosConfigSet = config: { name = config.hostname; value = nixpkgs.lib.nixosSystem (cleanHostname config); }; config:
toNixosSystemConfig = { hostname, system }: { builtins.removeAttrs config [ "hostname" ];
inherit system hostname; toPartialNixosConfigSet =
specialArgs = { inherit inputs; }; config:
modules = [ {
./hosts/${hostname}/hardware-configuration.nix name = config.hostname;
./hosts/${hostname}/configuration.nix value = nixpkgs.lib.nixosSystem (cleanHostname config);
inputs.home-manager.nixosModules.default };
]; toNixosSystemConfig =
}; { hostname, system }:
{
inherit system hostname;
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) systems; compileSystems = systems: lib.right builtins.listToAttrs (map toPartialNixosConfigSet) (map toNixosSystemConfig) systems;
in in
compileSystems compileSystems