formatting?
This commit is contained in:
parent
608982d8f2
commit
7486f2409b
1 changed files with 20 additions and 11 deletions
31
flake.nix
31
flake.nix
|
@ -24,17 +24,26 @@
|
|||
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 = { hostname, system }: {
|
||||
inherit system hostname;
|
||||
specialArgs = { inherit inputs; };
|
||||
modules = [
|
||||
./hosts/${hostname}/hardware-configuration.nix
|
||||
./hosts/${hostname}/configuration.nix
|
||||
inputs.home-manager.nixosModules.default
|
||||
];
|
||||
};
|
||||
cleanHostname =
|
||||
config:
|
||||
builtins.removeAttrs config [ "hostname" ];
|
||||
toPartialNixosConfigSet =
|
||||
config:
|
||||
{
|
||||
name = config.hostname;
|
||||
value = nixpkgs.lib.nixosSystem (cleanHostname config);
|
||||
};
|
||||
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;
|
||||
in
|
||||
compileSystems
|
||||
|
|
Loading…
Reference in a new issue