gurkan
/
nixos-config
Archived
1
0
Fork 0

Yeah my vm has no memory, use swap

This commit is contained in:
Gürkan 2023-07-31 21:12:50 +02:00
parent 8bd8193d55
commit 0531489184
6 changed files with 14 additions and 3 deletions

View File

@ -24,7 +24,7 @@
swapDevices = [
{
device = "/swapfile";
size = 1024;
size = 2048;
}
];

View File

@ -35,7 +35,6 @@ in
kernel.sysctl = {
"kernel.pty.max" = 24000;
"kernel.sysrq" = 1;
"vm.swappiness" = 0;
};
};

View File

@ -44,6 +44,8 @@
# push to current branch without forcing, for new branches
ptb = !sh -c 'git push origin $(git rev-parse --abbrev-ref HEAD)'
[safe]
directory = /shared/syncfolder/dotfiles/nixos/etc/nixos
'';
};

View File

@ -60,8 +60,8 @@ in
};
};
# Powersave
boot = {
# Powersave
extraModprobeConfig = lib.mkMerge [
"options snd_hda_intel power_save=1 power_save_controller=Y"
"options iwlwifi power_save=1 uapsd_disable=1 power_level=5"
@ -69,6 +69,10 @@ in
"options iwlmvm power_scheme=3"
];
kernelParams = ["intel_pstate=disable"];
# I have more than enough memory here
kernel.sysctl = {
"vm.swappiness" = 0;
};
};
# Libvirt stuff

View File

@ -55,6 +55,7 @@ in
direnv # .envrc runner
dmidecode
dnsutils
docker-compose
dstat
du-dust # better du alternative
ffmpeg

View File

@ -23,6 +23,11 @@
zoxide # Not available as an option yet, configured on home-manager separately
];
boot.kernel.sysctl = {
# I don't have time-critical stuff, but generally low on memory
"vm.swappiness" = 50;
};
services.my_snapper = {
subvolume = "/shared";
};