refactor(repo): reformat to nixfmt; relicense to 0BSD

This commit is contained in:
Artur Manuel 2025-03-06 20:45:49 +00:00
commit db2564d828
Signed by: amadaluzia
SSH key fingerprint: SHA256:Zwg7gBuZyaG48ucAZneJwltiXu0+tJb7c3lYt9AYlLg
39 changed files with 451 additions and 318 deletions

View file

@ -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;
};
}