4

Following the brief mention of vm.swappiness in https://nixos.org/nixos/manual/options.html:

I've tried setting:

  boot.kernel.sysctl = { "vm.swappiness" = 0;};

Within the usual hardware-configuration.nix. And I then did a nixos-rebuild switch and a reboot.

However I don't see that value being set in /etc/sysctl.d/nixos.conf?

In addition:

cat /proc/sys/vm/swappiness
60
  • 1
    Is this still not working for you @chris-stryczynski? This is working just fine for me putting exactly this in the main configuration.nix without rebooting (stateVersion 18.03 fwiw). Are you sure your hardware-configuration.nix is included properly? – Legogris Sep 12 '19 at 08:38
  • I just checked, it now is appearing in /etc/sysctl.d/nixos.conf. Strange. – Chris Stryczynski Sep 12 '19 at 09:53

0 Answers0