From af99b4960a9bf1043234354d685ed23818c14aaa Mon Sep 17 00:00:00 2001 From: Alexander Kassouni Date: Sat, 29 Aug 2026 23:53:40 -0700 Subject: new laptop --- machines/common/base.nix | 2 ++ machines/common/x11.nix | 23 ++++++++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) (limited to 'machines/common') diff --git a/machines/common/base.nix b/machines/common/base.nix index 46c82d9..4146d98 100644 --- a/machines/common/base.nix +++ b/machines/common/base.nix @@ -3,6 +3,8 @@ enable = true; }; + security.polkit.enable = true; + nix.settings.experimental-features = [ "nix-command" "flakes" diff --git a/machines/common/x11.nix b/machines/common/x11.nix index ed2084a..7fca346 100644 --- a/machines/common/x11.nix +++ b/machines/common/x11.nix @@ -1,4 +1,25 @@ -{...}: { +{pkgs, ...}: { + environment.systemPackages = [pkgs.brightnessctl]; + + # brightness keys, handled at the evdev level so they work in any WM + services.actkbd = { + enable = true; + bindings = [ + { + # XF86MonBrightnessUp + keys = [225]; + events = ["key"]; + command = "${pkgs.brightnessctl}/bin/brightnessctl set 5%+"; + } + { + # XF86MonBrightnessDown + keys = [224]; + events = ["key"]; + command = "${pkgs.brightnessctl}/bin/brightnessctl set 5%-"; + } + ]; + }; + services.displayManager.ly = { enable = true; x11Support = true; -- cgit v1.3.1