feat: add earlyoom

Dont really need this but its cool
This commit is contained in:
Glen Goodwin 2023-12-06 12:53:02 -05:00
parent 8870506a0f
commit 7e03c148e4
2 changed files with 12 additions and 0 deletions

View file

@ -27,6 +27,7 @@
./auditd.nix
./kernel.nix
./sysctl.nix
./earlyoom.nix
# Or modules from other flakes (such as nixos-hardware):
# inputs.hardware.nixosModules.common-cpu-amd

View file

@ -0,0 +1,11 @@
{
services.earlyoom = {
enable = true;
freeSwapThreshold = 2;
freeMemThreshold = 2;
extraArgs = [
"-g" "--avoid '^(.Hyrpland-wrapp|alacritty|zerotier-one|.waybar-wrapped)$'"
"--prefer '^(electron|libreoffice|gimp|Isolated Web Co)$'"
];
};
}