usbguard/module.nix: init
This commit is contained in:
parent
35d64feda2
commit
596d699abc
1 changed files with 23 additions and 0 deletions
23
modules/services/usbguard/module.nix
Normal file
23
modules/services/usbguard/module.nix
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
config,
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
...
|
||||||
|
}: let
|
||||||
|
inherit (config.meta.mainUser) username;
|
||||||
|
in {
|
||||||
|
environment.systemPackages = [pkgs.usbguard];
|
||||||
|
services.usbguard = {
|
||||||
|
IPCAllowedUsers = ["root" "${username}"];
|
||||||
|
presentDevicePolicy = "allow";
|
||||||
|
rules = ''
|
||||||
|
allow with-interface equals { 08:*:* }
|
||||||
|
|
||||||
|
# Reject devices with suspicious combination of interfaces
|
||||||
|
reject with-interface all-of { 08:*:* 03:00:* }
|
||||||
|
reject with-interface all-of { 08:*:* 03:01:* }
|
||||||
|
reject with-interface all-of { 08:*:* e0:*:* }
|
||||||
|
reject with-interface all-of { 08:*:* 02:*:* }
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue