nix-config/nixos/_mixins/hardware/roccat.nix

18 lines
368 B
Nix
Raw Permalink Normal View History

{ pkgs, username, ... }:
let
hidrawAccessGroup = "plugdev";
in
{
environment.systemPackages = with pkgs; [
roccat-tools
];
services.udev.extraRules = ''
KERNEL=="hidraw*", SUBSYSTEM=="hidraw", MODE="0660", GROUP="${hidrawAccessGroup}"
'';
users.groups.${hidrawAccessGroup} = { };
users.users.${username}.extraGroups = [ hidrawAccessGroup ];
}