nixos: condition sysctl.kptr_restrict on features.grsecurity

Conditioning `sysctl.kptr_restrict` on `features.grsecurity` supports
any grsecurity enabled kernel without having to enable the grsecurity
module.

Changed files
+1 -1
nixos
modules
config
+1 -1
nixos/modules/config/sysctl.nix
···
#
# Removed under grsecurity.
boot.kernel.sysctl."kernel.kptr_restrict" =
-
if config.security.grsecurity.enable then null else 1;
+
if (config.boot.kernelPackages.kernel.features.grsecurity or false) then null else 1;
};
}