From fd38deb103242ffbda3114027143a515822e03b2 Mon Sep 17 00:00:00 2001 From: Myned Date: Mon, 30 Dec 2024 13:38:40 -0600 Subject: [PATCH] openrazer: initial service Signed-off-by: Myned --- options/custom/services/default.nix | 1 + options/custom/services/openrazer.nix | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 options/custom/services/openrazer.nix diff --git a/options/custom/services/default.nix b/options/custom/services/default.nix index f1ba467..eafecd2 100644 --- a/options/custom/services/default.nix +++ b/options/custom/services/default.nix @@ -21,6 +21,7 @@ with lib; { #// kdeconnect.enable = true; libinput.enable = true; logind.enable = true; + openrazer.enable = true; pipewire.enable = true; playerctld.enable = true; ratbagd.enable = true; diff --git a/options/custom/services/openrazer.nix b/options/custom/services/openrazer.nix new file mode 100644 index 0000000..edda7ee --- /dev/null +++ b/options/custom/services/openrazer.nix @@ -0,0 +1,24 @@ +{ + config, + lib, + pkgs, + ... +}: +with lib; let + cfg = config.custom.services.openrazer; +in { + options.custom.services.openrazer = { + enable = mkOption {default = false;}; + }; + + config = mkIf cfg.enable { + # https://wiki.nixos.org/wiki/Hardware/Razer + hardware.openrazer = { + enable = true; + users = [config.custom.username]; + }; + + # https://polychromatic.app/ + environment.systemPackages = [pkgs.polychromatic]; + }; +}