more formatting

This commit is contained in:
Zynh Ludwig 2024-06-28 08:06:07 -07:00
parent 71f67f08ee
commit fec907a117

View file

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