mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-20 04:31:52 +00:00
nixos/dnscrypt-wrapper: fix rotate script failing to restart the service
This commit is contained in:
parent
c01cfb9e01
commit
c883311327
|
@ -145,6 +145,16 @@ in {
|
|||
};
|
||||
users.groups.dnscrypt-wrapper = { };
|
||||
|
||||
security.polkit.extraConfig = ''
|
||||
// Allow dnscrypt-wrapper user to restart dnscrypt-wrapper.service
|
||||
polkit.addRule(function(action, subject) {
|
||||
if (action.id == "org.freedesktop.systemd1.manage-units" &&
|
||||
action.lookup("unit") == "dnscrypt-wrapper.service" &&
|
||||
subject.user == "dnscrypt-wrapper") {
|
||||
return polkit.Result.YES;
|
||||
}
|
||||
});
|
||||
'';
|
||||
|
||||
systemd.services.dnscrypt-wrapper = {
|
||||
description = "dnscrypt-wrapper daemon";
|
||||
|
|
Loading…
Reference in a new issue