nixos/woodpecker-agents: use 'literalExample'
The next commit is going to add an option which takes a list of packages. So the example must be converted to make it documentable. This will also allow adding comments, to explain why some options are used.
This commit is contained in:
@@ -106,28 +106,30 @@ in
|
||||
agents = lib.mkOption {
|
||||
default = { };
|
||||
type = lib.types.attrsOf agentModule;
|
||||
example = {
|
||||
podman = {
|
||||
environment = {
|
||||
WOODPECKER_SERVER = "localhost:9000";
|
||||
WOODPECKER_BACKEND = "docker";
|
||||
DOCKER_HOST = "unix:///run/podman/podman.sock";
|
||||
example = lib.literalExpression ''
|
||||
{
|
||||
podman = {
|
||||
environment = {
|
||||
WOODPECKER_SERVER = "localhost:9000";
|
||||
WOODPECKER_BACKEND = "docker";
|
||||
DOCKER_HOST = "unix:///run/podman/podman.sock";
|
||||
};
|
||||
|
||||
extraGroups = [ "podman" ];
|
||||
|
||||
environmentFile = [ "/run/secrets/woodpecker/agent-secret.txt" ];
|
||||
};
|
||||
|
||||
extraGroups = [ "podman" ];
|
||||
exec = {
|
||||
environment = {
|
||||
WOODPECKER_SERVER = "localhost:9000";
|
||||
WOODPECKER_BACKEND = "local";
|
||||
};
|
||||
|
||||
environmentFile = [ "/run/secrets/woodpecker/agent-secret.txt" ];
|
||||
};
|
||||
|
||||
exec = {
|
||||
environment = {
|
||||
WOODPECKER_SERVER = "localhost:9000";
|
||||
WOODPECKER_BACKEND = "local";
|
||||
environmentFile = [ "/run/secrets/woodpecker/agent-secret.txt" ];
|
||||
};
|
||||
|
||||
environmentFile = [ "/run/secrets/woodpecker/agent-secret.txt" ];
|
||||
};
|
||||
};
|
||||
}
|
||||
'';
|
||||
description = lib.mdDoc "woodpecker-agents configurations";
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user