diff --git a/nixos/modules/security/grsecurity.nix b/nixos/modules/security/grsecurity.nix
index 5c8c4993951..d0c7fa6ec28 100644
--- a/nixos/modules/security/grsecurity.nix
+++ b/nixos/modules/security/grsecurity.nix
@@ -156,6 +156,24 @@ in
'';
};
+ denyUSB = mkOption {
+ type = types.bool;
+ default = false;
+ description = ''
+ If true, then set GRKERNSEC_DENYUSB y.
+
+ This enables a sysctl with name
+ kernel.grsecurity.deny_new_usb. Setting
+ its value to 1 will prevent any new USB
+ devices from being recognized by the OS. Any attempted
+ USB device insertion will be logged.
+
+ This option is intended to be used against custom USB
+ devices designed to exploit vulnerabilities in various USB
+ device drivers.
+ '';
+ };
+
restrictProc = mkOption {
type = types.bool;
default = false;