nixos/woodpecker-agents: simplify 'extraGroups' handling
This commit is contained in:
parent
c3afdb82db
commit
eb3bea6359
@ -25,8 +25,8 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
extraGroups = lib.mkOption {
|
extraGroups = lib.mkOption {
|
||||||
default = null;
|
type = lib.types.listOf lib.types.str;
|
||||||
type = lib.types.nullOr (lib.types.listOf lib.types.str);
|
default = [ ];
|
||||||
example = [ "podman" ];
|
example = [ "podman" ];
|
||||||
description = lib.mdDoc ''
|
description = lib.mdDoc ''
|
||||||
Additional groups for the systemd service.
|
Additional groups for the systemd service.
|
||||||
@ -58,7 +58,7 @@ let
|
|||||||
wants = [ "network-online.target" ];
|
wants = [ "network-online.target" ];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
DynamicUser = true;
|
DynamicUser = true;
|
||||||
SupplementaryGroups = lib.optionals (agentCfg.extraGroups != null) agentCfg.extraGroups;
|
SupplementaryGroups = agentCfg.extraGroups;
|
||||||
EnvironmentFile = agentCfg.environmentFile;
|
EnvironmentFile = agentCfg.environmentFile;
|
||||||
ExecStart = lib.getExe agentCfg.package;
|
ExecStart = lib.getExe agentCfg.package;
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
|
Loading…
Reference in New Issue
Block a user