mirror of
https://github.com/anotherhadi/nixy.git
synced 2026-08-21 18:55:47 +02:00
4e016613cd
Signed-off-by: Hadi <hadi@example.fr>
22 lines
719 B
Nix
22 lines
719 B
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 name "xHCI Host Controller"
|
|
allow id 0951:1666 name "DataTraveler 3.0"
|
|
allow id 1d6b:0003 name "xHCI Host Controller"
|
|
allow id 0461:574a name "HP 125 USB Optical Mouse"
|
|
allow id 0461:554a name "HP 125 Wired Keyboard"
|
|
'';
|
|
};
|
|
}
|