nixos/modules/misc/polkit.nix
2025-08-12 11:53:58 -07:00

17 lines
531 B
Nix

{ config, ... }:
{
security.polkit.enable = true;
security.polkit.extraConfig = ''
polkit.addRule(function(action, subject) {
if ((action.id == "org.xfce.thunar" ||
action.id == "org.freedesktop.policykit.exec" ||
action.id == "org.gnome.gparted" ||
action.id == "org.freedesktop.udisks2.encrypted-unlock-system" ||
action.id == "org.freedesktop.udisks2.filesystem-mount-system") &&
subject.isInGroup("wheel"))
{
return polkit.Result.YES;
}
});
'';
}