generated from andy/linux-nixos-hyprland-config-dotfiles
Initial commit
This commit is contained in:
25
nixos/usb.nix
Normal file
25
nixos/usb.nix
Normal file
@@ -0,0 +1,25 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
{
|
||||
# USB Automounting
|
||||
services.gvfs.enable = true;
|
||||
# services.udisks2.enable = true;
|
||||
# services.devmon.enable = true;
|
||||
|
||||
# Enable USB Guard
|
||||
services.usbguard = {
|
||||
enable = true;
|
||||
dbus.enable = true;
|
||||
implicitPolicyTarget = "block";
|
||||
# FIXME: set yours pref USB devices (change {id} to your trusted USB device), use `lsusb` command (from usbutils package) to get list of all connected USB devices including integrated devices like camera, bluetooth, wifi, etc. with their IDs or just disable `usbguard`
|
||||
rules = ''
|
||||
allow id {id} # device 1
|
||||
allow id {id} # device 2
|
||||
'';
|
||||
};
|
||||
|
||||
# Enable USB-specific packages
|
||||
environment.systemPackages = with pkgs; [
|
||||
usbutils
|
||||
];
|
||||
}
|
Reference in New Issue
Block a user