Add some ram management stuff
This will:
- Add a 1GB swap file
- Enable zram
- Enable early oom
This commit is contained in:
parent
e8a40f6936
commit
dec0fd139b
1 changed files with 12 additions and 0 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue