Skip to content

Commit

Permalink
usbguard: fix policy enums
Browse files Browse the repository at this point in the history
The available policies for `InsertedDevicePolicy` and
`ImplicitPolicyTarget` differ from the defined policy enum. This change
is to prevent users from configuring incorrect policies for `usbguard`

Related `usbguard` documentation
https://usbguard.github.io/documentation/configuration.html

Signed-off-by: Ameya Shenoy <shenoy.ameya@gmail.com>
  • Loading branch information
codingCoffee committed Mar 20, 2024
1 parent 8e9fa2d commit 99c0c32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nixos/modules/services/security/usbguard.nix
Expand Up @@ -80,7 +80,7 @@ in
};

implicitPolicyTarget = mkOption {
type = policy;
type = types.enum [ "allow" "block" "reject" ];
default = "block";
description = lib.mdDoc ''
How to treat USB devices that don't match any rule in the policy.
Expand Down Expand Up @@ -110,7 +110,7 @@ in
};

insertedDevicePolicy = mkOption {
type = policy;
type = types.enum [ "block" "reject" "apply-policy" ];
default = "apply-policy";
description = lib.mdDoc ''
How to treat USB devices that are already connected after the daemon
Expand Down

0 comments on commit 99c0c32

Please sign in to comment.