nixos/polkit: use tmpfiles to clean old dirs

These don't need to get cleaned up during activation; that can wait
until systemd-tmpfiles-setup runs.
This commit is contained in:
Jamey Sharp 2018-09-29 12:28:54 -07:00
parent bbc0f6f005
commit ae3d3b0fff

View File

@ -88,11 +88,11 @@ in
"polkit-agent-helper-1".source = "${pkgs.polkit.out}/lib/polkit-1/polkit-agent-helper-1"; "polkit-agent-helper-1".source = "${pkgs.polkit.out}/lib/polkit-1/polkit-agent-helper-1";
}; };
system.activationScripts.polkit = systemd.tmpfiles.rules = [
'' # Probably no more needed, clean up
# Probably no more needed, clean up "R /var/lib/polkit-1"
rm -rf /var/lib/{polkit-1,PolicyKit} "R /var/lib/PolicyKit"
''; ];
users.users.polkituser = { users.users.polkituser = {
description = "PolKit daemon"; description = "PolKit daemon";