Skip to content

Commit

Permalink
earlyoom: small cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
khaneliman committed Jan 5, 2025
1 parent c2e9925 commit 248bbf2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions modules/nixos/services/earlyoom/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ in

extraArgs =
let
# Don't kill please...
appsToAvoid = concatStringsSep "|" [
"(h|H)yprland"
"(x|X)wayland"
Expand All @@ -55,6 +56,7 @@ in
"zsh"
];

# Burn it with fire!
appsToPrefer = concatStringsSep "|" [
"Web Content"
"Isolated Web Co"
Expand All @@ -72,11 +74,11 @@ in
];
in
[
"-g" # kill all processes within a process group
"-g" # Kill all processes within a process group
"--avoid"
"'^(${appsToAvoid})$'" # things we want to not kill
"'^(${appsToAvoid})$'"
"--prefer"
"'^(${appsToPrefer})$'" # things we want to kill as soon as possible
"'^(${appsToPrefer})$'"
];

killHook = pkgs.writeShellScript "earlyoom-kill-hook" ''
Expand Down

0 comments on commit 248bbf2

Please sign in to comment.