add earlyoom to citadel and reduce swap

This commit is contained in:
Sam 2025-01-10 10:31:55 +00:00
parent 60f55565bc
commit 5a8a30e053
2 changed files with 7 additions and 2 deletions

View File

@ -80,7 +80,7 @@ in {
swapDevices = [ swapDevices = [
{ {
device = "/.swapvol/swapfile"; device = "/.swapvol/swapfile";
size = 32 * 1024; size = 4 * 1024;
} }
]; ];
@ -99,6 +99,11 @@ in {
# ${pkgs.xorg.xmodmap}/bin/xmodmap -e "keycode 46 = l L Right L" # ${pkgs.xorg.xmodmap}/bin/xmodmap -e "keycode 46 = l L Right L"
# ''; # '';
}; };
# enable oom killer when system ram drops below 5% free
earlyoom = {
enable = true;
freeMemThreshold = 5; # <%5 free
};
}; };
# fix cpu throttling on Lenovo Thinkpad # fix cpu throttling on Lenovo Thinkpad

View File

@ -108,7 +108,7 @@ in {
swapDevices = [ swapDevices = [
{ {
device = "/.swapvol/swapfile"; device = "/.swapvol/swapfile";
size = 32 * 1024; size = 4 * 1024;
} }
]; ];