run nix format on this repository

This commit is contained in:
Jonas Rabenstein 2025-09-14 23:29:30 +02:00
commit 5a3edc7ff0
19 changed files with 363 additions and 174 deletions

View file

@ -1,19 +1,45 @@
{ nixosUsers ? {}, nixosGroups ? {}, nixosModules, hmModules ? { default = {}; }, ...}@flake: { ... }@inputs: { host, ... }@imports: let
host' = name: snippets: let
system = { namespace?"fbs42", nixpkgs?"nixpkgs" }: inputs.${nixpkgs}.lib.nixosSystem {
specialArgs = { inherit inputs flake namespace; };
modules = builtins.concatLists (map (base: builtins.attrValues (flake.lib.scan { base = "${base}/host/${name}"; })) flake.lib.schema.base)
++ [ { config.networking.hostName = name; } ]
++ [ nixosModules.default ]
++ [ inputs.home-manager.nixosModules.default ]
++ [ { config.home-manager.sharedModules = [ hmModules.default ]; } ]
++ [ { config.home-manager.extraSpecialArgs = { inherit flake namespace; }; } ]
++ builtins.attrValues nixosUsers
++ builtins.attrValues nixosGroups
;
};
{
nixosUsers ? { },
nixosGroups ? { },
nixosModules,
hmModules ? {
default = { };
},
...
}@flake:
{ ... }@inputs:
{ host, ... }@imports:
let
host' =
name: snippets:
let
system =
{
namespace ? "fbs42",
nixpkgs ? "nixpkgs",
}:
inputs.${nixpkgs}.lib.nixosSystem {
specialArgs = { inherit inputs flake namespace; };
modules =
builtins.concatLists (
map (
base: builtins.attrValues (flake.lib.scan { base = "${base}/host/${name}"; })
) flake.lib.schema.base
)
++ [ { config.networking.hostName = name; } ]
++ [ nixosModules.default ]
++ [ inputs.home-manager.nixosModules.default ]
++ [ { config.home-manager.sharedModules = [ hmModules.default ]; } ]
++ [ { config.home-manager.extraSpecialArgs = { inherit flake namespace; }; } ]
++ builtins.attrValues nixosUsers
++ builtins.attrValues nixosGroups;
};
cfg = assert builtins.length snippets == 1; builtins.head snippets;
in system cfg;
cfg =
assert builtins.length snippets == 1;
builtins.head snippets;
in
system cfg;
in builtins.mapAttrs host' host
in
builtins.mapAttrs host' host