diff --git a/hosts/modules/base.nix b/hosts/modules/base.nix index 0bf5503..6bb04db 100644 --- a/hosts/modules/base.nix +++ b/hosts/modules/base.nix @@ -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.