feat(core): enable zram swap and earlyoom daemon with critical process protection

- Enable ZRAM compressed in-RAM swap to optimize memory pressure management.
- Enable `services.earlyoom` with desktop and system preservation rules (`niri`, `dms`, `systemd`, `sshd`).
This commit is contained in:
kiskaadee committed 2026-09-28 12:04:35 -05:00
1 parent e19bae5c29
commit deb489df45
1 file changed
+16
+16
View File
@@ -52,6 +52,22 @@
];
};
# 🧠 Memory & Swap Management
# Compressed in-RAM swap prevents synchronous page thrashing and lockups under high memory pressure.
zramSwap = {
enable = true;
};
# 🛡️ Early OOM Killer Daemon
# Intervenes proactively before the kernel freezes, protecting compositor and core session services.
services.earlyoom = {
enable = true;
enableNotifications = true;
extraArgs = [
"--avoid" "^(niri|dms|systemd|sshd)$"
];
};
# System-wide administrative tools
environment.systemPackages = with pkgs; [
cups-pk-helper