mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-08-21 10:45:49 +02:00
a4b07fa578
Signed-off-by: Hadi <hadi@example.com>
22 lines
1.3 KiB
Nix
22 lines
1.3 KiB
Nix
# USBGuard:
|
|
# The following line allow all USB devices until a proper policy is configured.
|
|
# Run `sudo usbguard generate-policy` with your devices plugged in,
|
|
# then set rules = "<output>" and switch implicitPolicyTarget to "block".
|
|
# services.usbguard.implicitPolicyTarget = lib.mkForce "allow";
|
|
{
|
|
services.usbguard = {
|
|
enable = true;
|
|
implicitPolicyTarget = "block";
|
|
IPCAllowedUsers = [
|
|
"root"
|
|
];
|
|
rules = ''
|
|
allow id 1d6b:0002 serial "0000:00:14.0" name "xHCI Host Controller" hash "jEP/6WzviqdJ5VSeTUY8PatCNBKeaREvo2OqdplND/o=" parent-hash "rV9bfLq7c2eA4tYjVjwO4bxhm+y6GgZpl9J60L0fBkY=" with-interface 09:00:00 with-connect-type ""
|
|
allow id 1d6b:0003 serial "0000:00:14.0" name "xHCI Host Controller" hash "prM+Jby/bFHCn2lNjQdAMbgc6tse3xVx+hZwjOPHSdQ=" parent-hash "rV9bfLq7c2eA4tYjVjwO4bxhm+y6GgZpl9J60L0fBkY=" with-interface 09:00:00 with-connect-type ""
|
|
allow id 17ef:6190 serial "" name "Lenovo Calliope USB Keyboard G2" hash "CfZ9R/aoXGm7BN/ojVEzKQwVoxCUtRWMuACrE7BL/5Y=" parent-hash "jEP/6WzviqdJ5VSeTUY8PatCNBKeaREvo2OqdplND/o=" via-port "1-10" with-interface { 03:01:01 03:00:00 } with-connect-type "hotplug"
|
|
allow id 0781:5581 name " SanDisk 3.2Gen1"
|
|
allow id 17ef:608d name "Lenovo USB Optical Mouse"
|
|
'';
|
|
};
|
|
}
|