Add some ram management stuff

This will:
    - Add a 1GB swap file
    - Enable zram
    - Enable early oom
This commit is contained in:
Alexander Wainwright
2025-11-27 21:52:03 +10:00
parent e8a40f6936
commit dec0fd139b

View File

@@ -11,6 +11,18 @@
shell = pkgs.fish;
};
# enable a 1GB swap file
swapDevices = [{
device = "/swapfile";
size = 1024;
}];
# enable zram. not totally sure if this does it in physical ram or just swap
zramSwap.enable = true;
# enable earlyoom to stop the system becoming unresponsive when out of ram
services.earlyoom.enable = true;
networking.firewall.allowedTCPPorts = [ 8000 8080 ];
# Set your time zone.