refactor(repo): reformat to nixfmt; relicense to 0BSD
This commit is contained in:
parent
035fb24038
commit
db2564d828
39 changed files with 451 additions and 318 deletions
|
@ -2,21 +2,25 @@
|
|||
inputs,
|
||||
self,
|
||||
...
|
||||
}: {
|
||||
flake.lib = let
|
||||
inherit (inputs.nixpkgs.lib) nixosSystem;
|
||||
inherit (builtins) mapAttrs;
|
||||
mkHost = {
|
||||
hostname,
|
||||
system,
|
||||
extraModules ? [],
|
||||
extraSpecialArgs ? {},
|
||||
}:
|
||||
nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = {inherit inputs self;} // extraSpecialArgs;
|
||||
modules =
|
||||
[
|
||||
}:
|
||||
{
|
||||
flake.lib =
|
||||
let
|
||||
inherit (inputs.nixpkgs.lib) nixosSystem;
|
||||
inherit (builtins) mapAttrs;
|
||||
mkHost =
|
||||
{
|
||||
hostname,
|
||||
system,
|
||||
extraModules ? [ ],
|
||||
extraSpecialArgs ? { },
|
||||
}:
|
||||
nixosSystem {
|
||||
inherit system;
|
||||
specialArgs = {
|
||||
inherit inputs self;
|
||||
} // extraSpecialArgs;
|
||||
modules = [
|
||||
../hosts/${hostname}
|
||||
self.nixosModules.default
|
||||
{
|
||||
|
@ -44,14 +48,16 @@
|
|||
};
|
||||
systemd.oomd = {
|
||||
enableRootSlice = true;
|
||||
extraConfig = {DefaultMemoryPressureDurationSec = "20s";};
|
||||
extraConfig = {
|
||||
DefaultMemoryPressureDurationSec = "20s";
|
||||
};
|
||||
};
|
||||
}
|
||||
]
|
||||
++ extraModules;
|
||||
};
|
||||
mkHosts = mapAttrs (hostname: args: mkHost (args // {inherit hostname;}));
|
||||
in {
|
||||
inherit mkHosts;
|
||||
};
|
||||
] ++ extraModules;
|
||||
};
|
||||
mkHosts = mapAttrs (hostname: args: mkHost (args // { inherit hostname; }));
|
||||
in
|
||||
{
|
||||
inherit mkHosts;
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue