about summary refs log tree commit diff
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2022-05-27T22·29-0700
committerclbot <clbot@tvl.fyi>2022-05-27T23·31+0000
commit932a03e2248651761743611b59914d64a49cf22c (patch)
treebb80666032d7847dbcbbb5595d5efcba2277e499
parent3dbfa04f217814b9de7994356a718ea03ec4b92d (diff)
feat(wpcarro/tarasco): Enable earlyoom r/4161
See the comment or other CLs I've made in the past about earlyoom.

Change-Id: Ia4c0c61784aa3e76644de91a95e8b9fbdd743b54
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5748
Tested-by: BuildkiteCI
Reviewed-by: wpcarro <wpcarro@gmail.com>
Autosubmit: wpcarro <wpcarro@gmail.com>
-rw-r--r--users/wpcarro/nixos/tarasco/default.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/users/wpcarro/nixos/tarasco/default.nix b/users/wpcarro/nixos/tarasco/default.nix
index c8b2d02356a1..ffb6e4c7ecab 100644
--- a/users/wpcarro/nixos/tarasco/default.nix
+++ b/users/wpcarro/nixos/tarasco/default.nix
@@ -63,6 +63,10 @@ in
   };
 
   services = wpcarro.common.services // {
+    # Check the amount of available memory and free swap a few times per second
+    # and kill the largest process if both are below 10%.
+    earlyoom.enable = true;
+
     tailscale.enable = true;
 
     openssh.enable = true;