From 043c8a4a3ef6ab4f62ce62d2c1165b668416845d Mon Sep 17 00:00:00 2001 From: ChUrl Date: Thu, 11 May 2023 23:27:04 +0200 Subject: [PATCH] polkit updates --- system/default.nix | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/system/default.nix b/system/default.nix index 665798d0..4194a7d2 100644 --- a/system/default.nix +++ b/system/default.nix @@ -72,16 +72,22 @@ polkit.extraConfig = '' // Allow to manage podman services polkit.addRule(function(action, subject) { - if (action.id == "org.freedesktop.systemd1.manage-units" && subject.user == "christoph" && - (action.lookup("unit") == "podman-jellyfin.service" || - action.lookup("unit") == "podman-sonarr.service" || - action.lookup("unit") == "podman-sabnzbd.service" || - action.lookup("unit") == "podman-hydra.service" || - action.lookup("unit") == "podman-homeassistant.service" || - action.lookup("unit") == "podman-picard.service" || - action.lookup("unit") == "podman-radarr.service" || - action.lookup("unit") == "wg0-LU-16.service" || - action.lookup("unit") == "wg0-DE-115.service")) { + if (action.id == "org.freedesktop.systemd1.manage-units" && subject.user == "christoph" && ( + // HomeLab Selfhosted Services + action.lookup("unit") == "podman-jellyfin.service" || + action.lookup("unit") == "podman-sonarr.service" || + action.lookup("unit") == "podman-radarr.service" || + action.lookup("unit") == "podman-hydra.service" || + action.lookup("unit") == "podman-sabnzbd.service" || + action.lookup("unit") == "podman-homeassistant.service" || + + // Various Containers + action.lookup("unit") == "podman-stablediffusion.service" || + + // VPNs + action.lookup("unit") == "wg0-LU-16.service" || + action.lookup("unit") == "wg0-DE-115.service" + )) { return polkit.Result.YES; } });