swap optimisations for SSD: reduce swappiness, enable ZRAM;

also use all cores for package building
This commit is contained in:
Trolli Schmittlauch 2018-10-22 23:49:39 +02:00
parent 77e3df8adf
commit f255023f45

View file

@ -33,6 +33,12 @@ in {
# exfat support
boot.extraModulePackages = [ config.boot.kernelPackages.exfat-nofuse ];
zramSwap =
{ enable = true;
memoryPercent = 20;
};
boot.kernel.sysctl."vm.swappiness" = 9;
# powermanagement
services.tlp =
{ enable = true;
@ -145,6 +151,8 @@ in {
gc-keep-outputs = true
gc-keep-derivations = true
'';
# use all cores for building
nix.buildCores = 0;
# This value determines the NixOS release with which your system is to be
# compatible, in order to avoid breaking some software such as database