New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
brightnessctl: Add systemd support #79663
Conversation
This makes it possible to use brightnessctl without udev rules / suid.
@primeos quickly skimming through I don't really see the point adding the The NixOS module is only adding it brightnessctl to As the latter isn't needed anymore, I don't see much value in keeping the module - We could just notify users they only need to add the package, as logind takes care of permissions. |
Due to the support of the systemd-logind API the udev rules aren't required anymore which renders this module useless [0]. Note: brightnessctl should now require a working D-Bus setup and a valid local logind session for this to work. [0]: NixOS#79663
@flokli since the systemd-logind API is used as a fallback option it could make a difference in some special cases (e.g. I've added a commit to remove the module (or should we deprecate it more gracefully with only a warning for now?). |
…port brightnessctl: Add systemd support (cherry picked from commit aaa1c7b)
Due to the support of the systemd-logind API the udev rules aren't required anymore which renders this module useless [0]. Note: brightnessctl should now require a working D-Bus setup and a valid local logind session for this to work. [0]: NixOS#79663 (cherry picked from commit 5282bc9)
This makes it possible to use brightnessctl without udev rules / suid.
I've used this on my laptop for quite some time now (but there wasn't a stable release until now) and didn't have any issues.
This should still be compatible with the existing NixOS module (but I've never used that - could somebody confirm this?) but now one can also just install
brightnessctl
and use it without any extra configuration (on a systemd based system).We could either enable this by default and still support the udev rules (like in this PR), drop the udev rules / NixOS module, or add a "use flag" but don't enable this by default (less recommended).
cc @megheaiulian @dje4321 @globin
Motivation for this change
Things done
sandbox
innix.conf
on non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
./result/bin/
)nix path-info -S
before and after)