mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-23 06:01:15 +00:00
Merge pull request #68218 from worldofpeace/cups-pk/no-auth-wheel
nixos/cupsd: passwordless admin for wheel with polkit
This commit is contained in:
commit
787eabd7c1
|
@ -291,6 +291,16 @@ in
|
|||
|
||||
services.dbus.packages = [ cups.out ] ++ optional polkitEnabled cups-pk-helper;
|
||||
|
||||
# Allow asswordless printer admin for members of wheel group
|
||||
security.polkit.extraConfig = mkIf polkitEnabled ''
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (action.id == "org.opensuse.cupspkhelper.mechanism.all-edit" &&
|
||||
subject.isInGroup("wheel")){
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
||||
'';
|
||||
|
||||
# Cups uses libusb to talk to printers, and does not use the
|
||||
# linux kernel driver. If the driver is not in a black list, it
|
||||
# gets loaded, and then cups cannot access the printers.
|
||||
|
|
Loading…
Reference in a new issue