This commit is contained in:
mjallen18
2026-03-23 17:26:01 -05:00
parent 0b9a301a92
commit 068d6c8f94
5 changed files with 256 additions and 0 deletions

View File

@@ -89,6 +89,21 @@ let
moduleConfig = {
environment.systemPackages = with pkgs; [ nebula ];
# Allow users in the wheel group to start/stop the nebula service without
# a password prompt (used by the GNOME panel extension toggle).
security.polkit.extraConfig = ''
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.systemd1.manage-units" &&
action.lookup("unit") == "nebula@${cfg.networkName}.service" &&
(action.lookup("verb") == "start" || action.lookup("verb") == "stop") &&
subject.local == true &&
subject.active == true &&
subject.isInGroup("wheel")) {
return polkit.Result.YES;
}
});
'';
services.nebula.networks.${cfg.networkName} = {
enable = true;
enableReload = true;