1
0
Fork 0
nixfiles/hosts/osmium/polkit-test.nix

30 lines
772 B
Nix

{ ... }:
{
security.polkit.enable = true;
security.polkit.extraConfig = ''
polkit.addRule(function(action, subject) {
if (
action.id == "org.freedesktop.systemd1.manage-units"
&& action.lookup("unit") == "update-from-hydra-olimex-esp32-poe.service"
&& action.lookup("verb") == "start"
&& subject.user == "clerie"
) {
return polkit.Result.YES;
}
});
'';
services.update-from-hydra.paths.olimex-esp32-poe = {
enable = true;
hydraUrl = "https://hydra.clerie.de";
hydraProject = "clerie";
hydraJobset = "olimex-esp32-poe";
hydraJob = "olimex-esp32-poe";
nixStoreUri = "https://nix-cache.clerie.de";
resultPath = "/srv/olimex-esp32-poe";
};
}