diff --git a/hosts/Infini-DESKTOP/default.nix b/hosts/Infini-DESKTOP/default.nix index 9ca9ca7..597c896 100644 --- a/hosts/Infini-DESKTOP/default.nix +++ b/hosts/Infini-DESKTOP/default.nix @@ -20,6 +20,8 @@ gpu.nvidia = true; wireless.enable = true; form.desktop = true; + + peripherals.razer.enable = true; }; services = { foldingathome = { diff --git a/modules/modules/hardware/peripherals/razer.nix b/modules/modules/hardware/peripherals/razer.nix new file mode 100644 index 0000000..27e18bf --- /dev/null +++ b/modules/modules/hardware/peripherals/razer.nix @@ -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" ]; + }; +}