peripherals/razer: add razer hardware module

This commit is contained in:
Infinidoge 2022-01-07 16:59:17 -05:00
parent c1ed58de3e
commit afa497d9ea
2 changed files with 23 additions and 0 deletions

View file

@ -0,0 +1,21 @@
# from https://github.com/hlissner/dotfiles/blob/master/modules/hardware/razer.nix
{ options, config, lib, pkgs, ... }:
with lib;
with lib.hlissner;
let cfg = config.modules.hardware.peripherals.razer;
in
{
options.modules.hardware.peripherals.razer = {
enable = mkBoolOpt false;
};
config = mkIf cfg.enable {
hardware.openrazer = {
enable = true;
users = [ config.user.name ];
};
user.extraGroups = [ "plugdev" ];
};
}