enable zram

This commit is contained in:
Dmitriy Holkin 2020-04-26 14:48:39 +04:00
parent a03e2dfdaa
commit efccd839ce

View File

@ -19,9 +19,18 @@ in {
services.earlyoom = { services.earlyoom = {
enable = device.ram < 12; enable = device.ram < 12;
freeMemThreshold = 5; freeMemThreshold = 5;
freeSwapThreshold = 100; freeSwapThreshold = 20;
}; };
# Enable zram, disable zswap
zramSwap = {
enable = true;
algorithm = "zstd";
memoryPercent = 60;
numDevices = 1;
};
boot.kernelParams = [ "zswap.enabled=0" ];
services.printing = { services.printing = {
enable = true; enable = true;
drivers = [ pkgs.gutenprint ]; drivers = [ pkgs.gutenprint ];
@ -50,11 +59,11 @@ in {
virtualisation.docker.enable = device.enableVirtualisation; virtualisation.docker.enable = device.enableVirtualisation;
# virtualisation.virtualbox.host = { virtualisation.virtualbox.host = {
# enable = device.enableVirtualisation; enable = device.enableVirtualisation;
# # enableHardening = false; # enableHardening = false;
# enableExtensionPack = false; enableExtensionPack = false;
# }; };
# Install cdemu for some gaming purposes # Install cdemu for some gaming purposes
# programs.cdemu = { # programs.cdemu = {