nixos/sysctl: reduce prio of "kernel.kptr_restrict" to mkDefault

Users should be able to override this value without having to use mkForce.

Changed files
+1 -1
nixos
modules
config
+1 -1
nixos/modules/config/sysctl.nix
···
# Hide kernel pointers (e.g. in /proc/modules) for unprivileged
# users as these make it easier to exploit kernel vulnerabilities.
-
boot.kernel.sysctl."kernel.kptr_restrict" = 1;
+
boot.kernel.sysctl."kernel.kptr_restrict" = mkDefault 1;
# Disable YAMA by default to allow easy debugging.
boot.kernel.sysctl."kernel.yama.ptrace_scope" = mkDefault 0;