more formatting
This commit is contained in:
parent
71f67f08ee
commit
fec907a117
1 changed files with 12 additions and 19 deletions
19
flake.nix
19
flake.nix
|
@ -24,19 +24,12 @@
|
||||||
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;
|
||||||
|
value = nixpkgs.lib.nixosSystem {
|
||||||
|
inherit system;
|
||||||
specialArgs = { inherit inputs; };
|
specialArgs = { inherit inputs; };
|
||||||
modules = [
|
modules = [
|
||||||
./hosts/${hostname}/hardware-configuration.nix
|
./hosts/${hostname}/hardware-configuration.nix
|
||||||
|
@ -44,12 +37,12 @@
|
||||||
inputs.home-manager.nixosModules.default
|
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
|
||||||
|
|
Loading…
Reference in a new issue