diff --git a/nixos/modules/config/sysctl.nix b/nixos/modules/config/sysctl.nix index 3b6ccd380c7..e83562a8356 100644 --- a/nixos/modules/config/sysctl.nix +++ b/nixos/modules/config/sysctl.nix @@ -64,6 +64,6 @@ in # # 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; }; }