diff --git a/modules/services/backlight.nix b/modules/services/backlight.nix index 0330e5b..b8531fb 100644 --- a/modules/services/backlight.nix +++ b/modules/services/backlight.nix @@ -1,11 +1,18 @@ -{ - flake.modules.nixos.backlight = { - programs.light = { - enable = true; - brightnessKeys = { - enable = true; - step = 5; - }; - }; +{ inputs, ... }: { + flake.modules.nixos.backlight = { pkgs, ... }: { + environment.systemPackages = with pkgs; [ + brightnessctl + ]; + + home-manager.sharedModules = [ + inputs.self.modules.homeManager.backlight + ]; + }; + + flake.modules.homeManager.backlight = { + wayland.windowManager.hyprland.settings.bind = [ + ", code:232, exec, brightnessctl set 5%-" + ", code:233, exec, brightnessctl set +5%" + ]; }; }