summaryrefslogtreecommitdiff
path: root/hosts/local/master/configuration.nix
diff options
context:
space:
mode:
Diffstat (limited to 'hosts/local/master/configuration.nix')
-rw-r--r--hosts/local/master/configuration.nix21
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;
}