home

My NixOS systems configurations.
Log | Files | Refs | LICENSE

commit 5b86fcab3594d759bbce47c6e4a1db6e5c661c4a
parent ded6d0d1f68ae04f07e64608c15d23c7a4bd5bf7
Author: Vincent Demeester <vincent@sbr.pm>
Date:   Sat, 19 Mar 2022 11:18:02 +0100

systems/aomi: fix brightness

Ideally only brightnesctl should be needed. The udev is for xbacklight
to work. I need to fix the i3 configuration to be able to remove those
udev rules.

Signed-off-by: Vincent Demeester <vincent@sbr.pm>

Diffstat:
Msystems/hosts/aomi.nix | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/systems/hosts/aomi.nix b/systems/hosts/aomi.nix @@ -119,12 +119,17 @@ in # Suspend the system when battery level drops to 5% or lower SUBSYSTEM=="power_supply", ATTR{status}=="Discharging", ATTR{capacity}=="[0-5]", RUN+="${pkgs.systemd}/bin/systemctl hibernate" + + # Allow brightness + ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="intel_backlight", RUN+="${pkgs.coreutils}/bin/chgrp video /sys/class/backlight/%k/brightness" + ACTION=="add", SUBSYSTEM=="backlight", KERNEL=="intel_backlight", RUN+="${pkgs.coreutils}/bin/chmod g+w /sys/class/backlight/%k/brightness" ''; environment.systemPackages = with pkgs; [ virtmanager # force xbacklight to work acpilight + brightnessctl steam-run asciinema ];