nixos-configs/modules/razer.nix
matt1432 fc119fb324
All checks were successful
Discord / discord commits (push) Has been skipped
feat: add razer module for peripherals
2024-01-29 21:01:52 -05:00

35 lines
575 B
Nix

{
config,
lib,
pkgs,
...
}: let
inherit (config.vars) mainUser;
inherit (lib) mkIf;
cfgHypr =
config
.home-manager
.users
.${mainUser}
.wayland
.windowManager
.hyprland;
in {
hardware.openrazer = {
enable = true;
users = [mainUser];
};
environment.systemPackages = with pkgs; [
openrazer-daemon
polychromatic
];
# HOME-MANAGER CONFIG
home-manager.users.${mainUser} = {
wayland.windowManager.hyprland = mkIf (cfgHypr.enable) {
settings.exec-once = ["polychromatic-tray-applet"];
};
};
}