Configure EarlyOOM
This commit is contained in:
parent
b30f9a4f46
commit
d1d94f9c24
|
@ -1,3 +1,4 @@
|
|||
{ config, ... }:
|
||||
{
|
||||
imports = [ ./users ];
|
||||
|
||||
|
@ -50,4 +51,20 @@
|
|||
'';
|
||||
settings.PasswordAuthentication = false;
|
||||
};
|
||||
|
||||
services.earlyoom = {
|
||||
enable = true;
|
||||
freeSwapThreshold = 5;
|
||||
freeMemThreshold = 5;
|
||||
extraArgs = [
|
||||
"-g"
|
||||
"--avoid '^(sshd|systemd.*|tailscale.*|)$'"
|
||||
];
|
||||
};
|
||||
# Fix Wireguard and Tailscale with NetworkManager
|
||||
networking.firewall = {
|
||||
checkReversePath = "loose";
|
||||
trustedInterfaces = [ "tailscale0" ];
|
||||
allowedUDPPorts = [ config.services.tailscale.port ];
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue