forked from fediversity/fediversity
make things conditional
This commit is contained in:
parent
ff844b74ee
commit
757f4a13ed
1 changed files with 65 additions and 60 deletions
|
|
@ -64,12 +64,13 @@
|
||||||
|
|
||||||
vars.generators.woodpecker =
|
vars.generators.woodpecker =
|
||||||
let
|
let
|
||||||
fileNames = [
|
fileNames =
|
||||||
|
[
|
||||||
"woodpecker-gitea-client"
|
"woodpecker-gitea-client"
|
||||||
"woodpecker-gitea-secret"
|
"woodpecker-gitea-secret"
|
||||||
"woodpecker-agent-exec"
|
]
|
||||||
"woodpecker-agent-container"
|
++ (lib.lists.optional config.services.woodpecker-agents.agents.exec.enable "woodpecker-agent-exec")
|
||||||
];
|
++ (lib.lists.optional config.services.woodpecker-agents.agents.docker.enable "woodpecker-agent-container");
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
runtimeInputs = [
|
runtimeInputs = [
|
||||||
|
|
@ -137,6 +138,7 @@
|
||||||
WOODPECKER_GRPC_SECURE=false
|
WOODPECKER_GRPC_SECURE=false
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
|
(lib.mkMerge [
|
||||||
{
|
{
|
||||||
# https://woodpecker-ci.org/docs/administration/configuration/server
|
# https://woodpecker-ci.org/docs/administration/configuration/server
|
||||||
"woodpecker-server.conf" = {
|
"woodpecker-server.conf" = {
|
||||||
|
|
@ -159,7 +161,8 @@
|
||||||
WOODPECKER_GRPC_ADDR=:9000
|
WOODPECKER_GRPC_ADDR=:9000
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
(lib.mkIf config.services.woodpecker-agents.agents.exec.enable {
|
||||||
# https://woodpecker-ci.org/docs/administration/configuration/backends/local#environment-variables
|
# https://woodpecker-ci.org/docs/administration/configuration/backends/local#environment-variables
|
||||||
"woodpecker-agent-exec.conf" = {
|
"woodpecker-agent-exec.conf" = {
|
||||||
secret = true;
|
secret = true;
|
||||||
|
|
@ -174,7 +177,8 @@
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
})
|
||||||
|
(lib.mkIf config.services.woodpecker-agents.agents.docker.enable {
|
||||||
# https://woodpecker-ci.org/docs/administration/configuration/backends/docker#environment-variables
|
# https://woodpecker-ci.org/docs/administration/configuration/backends/docker#environment-variables
|
||||||
"woodpecker-agent-podman.conf" = {
|
"woodpecker-agent-podman.conf" = {
|
||||||
secret = true;
|
secret = true;
|
||||||
|
|
@ -190,7 +194,8 @@
|
||||||
]
|
]
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
};
|
})
|
||||||
|
]);
|
||||||
};
|
};
|
||||||
|
|
||||||
# enable git-lfs
|
# enable git-lfs
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue