nixos/woodpecker-agents: use list for environment files
This commit is contained in:
parent
e4f5f1b718
commit
c3afdb82db
@ -34,9 +34,9 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
environmentFile = lib.mkOption {
|
environmentFile = lib.mkOption {
|
||||||
type = lib.types.nullOr lib.types.path;
|
type = lib.types.listOf lib.types.path;
|
||||||
default = null;
|
default = [ ];
|
||||||
example = "/var/secrets/woodpecker-agent.env";
|
example = [ "/var/secrets/woodpecker-agent.env" ];
|
||||||
description = lib.mdDoc ''
|
description = lib.mdDoc ''
|
||||||
File to load environment variables
|
File to load environment variables
|
||||||
from. This is helpful for specifying secrets.
|
from. This is helpful for specifying secrets.
|
||||||
@ -59,7 +59,7 @@ let
|
|||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
DynamicUser = true;
|
DynamicUser = true;
|
||||||
SupplementaryGroups = lib.optionals (agentCfg.extraGroups != null) agentCfg.extraGroups;
|
SupplementaryGroups = lib.optionals (agentCfg.extraGroups != null) agentCfg.extraGroups;
|
||||||
EnvironmentFile = lib.optional (agentCfg.environmentFile != null) agentCfg.environmentFile;
|
EnvironmentFile = agentCfg.environmentFile;
|
||||||
ExecStart = lib.getExe agentCfg.package;
|
ExecStart = lib.getExe agentCfg.package;
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
RestartSec = 15;
|
RestartSec = 15;
|
||||||
|
Loading…
Reference in New Issue
Block a user