nixos/woodpecker-agents: simplify 'extraGroups' handling

This commit is contained in:
Bruno BELANYI 2023-03-18 17:05:05 +00:00
parent c3afdb82db
commit eb3bea6359

View File

@ -25,8 +25,8 @@ let
};
extraGroups = lib.mkOption {
default = null;
type = lib.types.nullOr (lib.types.listOf lib.types.str);
type = lib.types.listOf lib.types.str;
default = [ ];
example = [ "podman" ];
description = lib.mdDoc ''
Additional groups for the systemd service.
@ -58,7 +58,7 @@ let
wants = [ "network-online.target" ];
serviceConfig = {
DynamicUser = true;
SupplementaryGroups = lib.optionals (agentCfg.extraGroups != null) agentCfg.extraGroups;
SupplementaryGroups = agentCfg.extraGroups;
EnvironmentFile = agentCfg.environmentFile;
ExecStart = lib.getExe agentCfg.package;
Restart = "on-failure";