diff --git a/modules/desktop/graphics/labwc.nix b/modules/desktop/graphics/labwc.nix index 79998945d..9fa62fdc5 100644 --- a/modules/desktop/graphics/labwc.nix +++ b/modules/desktop/graphics/labwc.nix @@ -60,12 +60,18 @@ + ${lib.optionalString config.ghaf.profiles.debug.enable '' ''} - + + + + + + @@ -288,5 +294,10 @@ in { }; wantedBy = ["default.target"]; }; + + #Allow video group to change brightness + services.udev.extraRules = '' + ACTION=="add", SUBSYSTEM=="backlight", RUN+="${pkgs.coreutils}/bin/chgrp video $sys$devpath/brightness", RUN+="${pkgs.coreutils}/bin/chmod a+w $sys$devpath/brightness" + ''; }; } diff --git a/modules/hardware/lenovo-x1/definitions/default.nix b/modules/hardware/lenovo-x1/definitions/default.nix index 9fbea6e6c..9437accf6 100644 --- a/modules/hardware/lenovo-x1/definitions/default.nix +++ b/modules/hardware/lenovo-x1/definitions/default.nix @@ -29,6 +29,7 @@ in { virtioInputHostEvdevs = [ # Lenovo X1 touchpad and keyboard "/dev/input/by-path/platform-i8042-serio-0-event-kbd" + "/dev/input/by-path/platform-thinkpad_acpi-event" "/dev/mouse" "/dev/touchpad" # Lenovo X1 trackpoint (red button/joystick) @@ -48,6 +49,8 @@ in { services.udev.extraRules = '' # Laptop keyboard SUBSYSTEM=="input", ATTRS{name}=="AT Translated Set 2 keyboard", GROUP="kvm" + # Laptop keyboard multimedia buttons + SUBSYSTEM=="input", ATTRS{name}=="ThinkPad Extra Buttons", GROUP="kvm" # Laptop TrackPoint SUBSYSTEM=="input", ATTRS{name}=="TPPS/2 Elan TrackPoint", GROUP="kvm" # Lenovo X1 integrated webcam diff --git a/targets/lenovo-x1/everything.nix b/targets/lenovo-x1/everything.nix index 38cb7de87..7323c5b20 100644 --- a/targets/lenovo-x1/everything.nix +++ b/targets/lenovo-x1/everything.nix @@ -139,6 +139,7 @@ "iommu=pt" # Prevent i915 module from being accidentally used by host "module_blacklist=i915" + "acpi_backlight=vendor" "vfio-pci.ids=${builtins.concatStringsSep "," vfioPciIds}" ];