From f3724fee3ad4cf1e65ca9d6fde5577f39bfe3b61 Mon Sep 17 00:00:00 2001 From: Weckyy702 Date: Sat, 30 May 2026 19:51:08 +0200 Subject: [PATCH] Modules/Backlight: Swap out 'light' for brightnessctl --- modules/services/backlight.nix | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) 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%" + ]; }; }