diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-09-14 13:17:39 +0000 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-09-14 13:17:39 +0000 |
commit | 56e87d10ec12e00eab5c4b5710e01ab50eec267f (patch) | |
tree | baff33c3da97619d02441379b3f0f369da8f3d5a /nixpkgs/nixos/modules/services/continuous-integration/woodpecker/agents.nix | |
parent | cc14c6e02d8424c1d446d248f71e08243181af8d (diff) | |
parent | 3a2786eea085f040a66ecde1bc3ddc7099f6dbeb (diff) | |
download | nixlib-56e87d10ec12e00eab5c4b5710e01ab50eec267f.tar nixlib-56e87d10ec12e00eab5c4b5710e01ab50eec267f.tar.gz nixlib-56e87d10ec12e00eab5c4b5710e01ab50eec267f.tar.bz2 nixlib-56e87d10ec12e00eab5c4b5710e01ab50eec267f.tar.lz nixlib-56e87d10ec12e00eab5c4b5710e01ab50eec267f.tar.xz nixlib-56e87d10ec12e00eab5c4b5710e01ab50eec267f.tar.zst nixlib-56e87d10ec12e00eab5c4b5710e01ab50eec267f.zip |
Merge branch 'nixos-unstable' of https://github.com/NixOS/nixpkgs
Diffstat (limited to 'nixpkgs/nixos/modules/services/continuous-integration/woodpecker/agents.nix')
-rw-r--r-- | nixpkgs/nixos/modules/services/continuous-integration/woodpecker/agents.nix | 59 |
1 files changed, 41 insertions, 18 deletions
diff --git a/nixpkgs/nixos/modules/services/continuous-integration/woodpecker/agents.nix b/nixpkgs/nixos/modules/services/continuous-integration/woodpecker/agents.nix index cc5b903afd59..3b883c72ff07 100644 --- a/nixpkgs/nixos/modules/services/continuous-integration/woodpecker/agents.nix +++ b/nixpkgs/nixos/modules/services/continuous-integration/woodpecker/agents.nix @@ -35,6 +35,16 @@ let ''; }; + path = lib.mkOption { + type = lib.types.listOf lib.types.package; + default = [ ]; + example = [ "" ]; + description = lib.mdDoc '' + Additional packages that should be added to the agent's `PATH`. + Mostly useful for the `local` backend. + ''; + }; + environmentFile = lib.mkOption { type = lib.types.listOf lib.types.path; default = [ ]; @@ -94,7 +104,7 @@ let "-/etc/localtime" ]; }; - inherit (agentCfg) environment; + inherit (agentCfg) environment path; }; }; in @@ -106,28 +116,41 @@ in agents = lib.mkOption { default = { }; type = lib.types.attrsOf agentModule; - example = { - docker = { - 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 = [ "docker" ]; + exec = { + environment = { + WOODPECKER_SERVER = "localhost:9000"; + WOODPECKER_BACKEND = "local"; + }; - environmentFile = "/run/secrets/woodpecker/agent-secret.txt"; - }; + environmentFile = [ "/run/secrets/woodpecker/agent-secret.txt" ]; - exec = { - environment = { - WOODPECKER_SERVER = "localhost:9000"; - WOODPECKER_BACKEND = "exec"; + path = [ + # Needed to clone repos + git + git-lfs + woodpecker-plugin-git + # Used by the runner as the default shell + bash + # Most likely to be used in pipeline definitions + coreutils + ]; }; - - environmentFile = "/run/secrets/woodpecker/agent-secret.txt"; - }; - }; + } + ''; description = lib.mdDoc "woodpecker-agents configurations"; }; }; |