diff options
| author | polwex <polwex@sortug.com> | 2025-10-20 09:08:14 +0700 |
|---|---|---|
| committer | polwex <polwex@sortug.com> | 2025-10-20 09:08:14 +0700 |
| commit | 4bb8dd864cf5077018327d6f55058b87def03d45 (patch) | |
| tree | 9de20852c41f2dc1582a622b1d2b9aff8e63af30 /hosts/local/master | |
| parent | dbf3c03bd7a285d2bf3530679539f33f5c83d477 (diff) | |
no moar hanging
Diffstat (limited to 'hosts/local/master')
| -rw-r--r-- | hosts/local/master/configuration.nix | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/hosts/local/master/configuration.nix b/hosts/local/master/configuration.nix index 7b883d3..cad65c8 100644 --- a/hosts/local/master/configuration.nix +++ b/hosts/local/master/configuration.nix @@ -13,8 +13,8 @@ in { ../../linux.nix ../../unfree.nix #../../android.nix - # ../gui.nix - # ../i3.nix + ../gui.nix + ../i3.nix # ../gnome.nix # ../wayland.nix ../nvidia.nix @@ -56,7 +56,8 @@ in { zramSwap = { enable = true; - # algorithm = "zstd"; + memoryPercent = 100; + algorithm = "zstd"; # memoryPercent = 30; }; @@ -114,4 +115,18 @@ in { # }; # }; # }; + # stop fucking crashing + + systemd.services.nix-daemon.serviceConfig = { + MemoryHigh = "22G"; # throttle above this + MemoryMax = "28G"; # hard kill above this + # optional niceties: + CPUWeight = 50; + IOWeight = 50; + TasksMax = 4096; + # Let systemd-oomd preferentially kill these if needed: + ManagedOOMMemoryPressure = "kill"; + ManagedOOMMemoryPressureLimit = "50%"; + }; + systemd.oomd.enable = true; } |
