2025-01-18 12:34:41 +00:00
|
|
|
{
|
|
|
|
inputs,
|
|
|
|
self,
|
2025-02-02 16:37:47 +00:00
|
|
|
...
|
|
|
|
}: {
|
|
|
|
flake.lib = inputs.nixpkgs.lib.extend (_: _: {
|
|
|
|
mkHost = {
|
|
|
|
host,
|
|
|
|
system,
|
|
|
|
extraModules ? [],
|
|
|
|
}:
|
|
|
|
inputs.nixpkgs.lib.nixosSystem {
|
|
|
|
inherit system;
|
|
|
|
modules =
|
|
|
|
extraModules
|
|
|
|
++ [
|
|
|
|
../hosts/${host}
|
|
|
|
inputs.self.nixosModules.default
|
|
|
|
({config, ...}: {
|
|
|
|
config = {
|
|
|
|
nix = {
|
|
|
|
settings.extra-experimental-features = [
|
|
|
|
"nix-command"
|
|
|
|
"flakes"
|
|
|
|
];
|
|
|
|
gc = {
|
|
|
|
automatic = true;
|
|
|
|
dates = "weekly";
|
|
|
|
};
|
2024-10-16 00:03:53 +01:00
|
|
|
};
|
2025-02-02 16:37:47 +00:00
|
|
|
nixpkgs.config.allowUnfree = true;
|
|
|
|
environment.shellAliases = {
|
|
|
|
rebs = "nixos-rebuild --use-remote-sudo switch --flake .#${host}";
|
|
|
|
rebt = "nixos-rebuild --use-remote-sudo test --flake .#${host}";
|
|
|
|
};
|
|
|
|
networking.hostName = host;
|
2025-02-08 22:24:28 +00:00
|
|
|
systemd.oomd = {
|
|
|
|
enableRootSlice = true;
|
|
|
|
};
|
2024-10-16 00:03:53 +01:00
|
|
|
};
|
2025-02-02 16:37:47 +00:00
|
|
|
})
|
|
|
|
];
|
|
|
|
specialArgs = {
|
|
|
|
inherit inputs self;
|
|
|
|
};
|
2024-10-16 00:03:53 +01:00
|
|
|
};
|
2025-02-02 16:37:47 +00:00
|
|
|
});
|
2024-10-16 00:03:53 +01:00
|
|
|
}
|