alqueva/lib/default.nix
Artur Manuel 5b2a8031c2 chore(emergency): commit everything to prepare for a reinstall
What happened? My system OOM'd, and now my entire system is broken.

I have to reinstall *everything*.
2025-02-08 22:24:28 +00:00

51 lines
1.3 KiB
Nix

{
inputs,
self,
...
}: {
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";
};
};
nixpkgs.config.allowUnfree = true;
environment.shellAliases = {
rebs = "nixos-rebuild --use-remote-sudo switch --flake .#${host}";
rebt = "nixos-rebuild --use-remote-sudo test --flake .#${host}";
};
nixpkgs.overlays = [
inputs.self.overlays.default
];
networking.hostName = host;
systemd.oomd = {
enableRootSlice = true;
};
};
})
];
specialArgs = {
inherit inputs self;
};
};
});
}