From 05b5a0c8a41a73c1715c6e67e2e0b74f806284d2 Mon Sep 17 00:00:00 2001 From: ChUrl Date: Sat, 27 May 2023 15:01:16 +0200 Subject: [PATCH] Use polkit module --- system/default.nix | 29 ++--------------------------- 1 file changed, 2 insertions(+), 27 deletions(-) diff --git a/system/default.nix b/system/default.nix index 88d95b9f..0f7a6354 100644 --- a/system/default.nix +++ b/system/default.nix @@ -22,6 +22,8 @@ with mylib.networking; { ]; modules = { + polkit.enable = true; + systemd-networkd = { enable = true; hostname = hostname; @@ -111,33 +113,6 @@ with mylib.networking; { protectKernelImage = true; rtkit.enable = true; - polkit.enable = true; - # TODO: Add this to container/podman system module - # TODO: Also generate the containers.txt file through the container/podman system module - polkit.extraConfig = '' - // Allow to manage podman services - polkit.addRule(function(action, subject) { - 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; - } - }); - ''; - # TODO: Replace with polkit sudo.enable = true; sudo.extraRules = [