feat: add earlyoom
Dont really need this but its cool
This commit is contained in:
parent
8870506a0f
commit
7e03c148e4
2 changed files with 12 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
11
hosts/candlekeep/earlyoom.nix
Normal file
11
hosts/candlekeep/earlyoom.nix
Normal 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)$'"
|
||||
];
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue