about summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorAaron Andersen <aaron@fosslib.net>2024-02-28 13:16:23 -0500
committerGitHub <noreply@github.com>2024-02-28 13:16:23 -0500
commit4b0a521b248f02e4707473d1711779e01af7c588 (patch)
treec3bf3cd0e15fefce3c2ba7a0e575a47080d4759f /nixos/modules
parent60f4bccad6e0439ef11b9c9809b88c5aedb44058 (diff)
parent1f83c951917be4389b8364f6e7632564064bba9d (diff)
Merge pull request #287264 from NixOS/backport-286063-to-release-23.11
[Backport release-23.11] nixos/github-runners: only override pkg if it has a `nodeRuntimes` arg
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/services/continuous-integration/github-runner/service.nix3
1 files changed, 2 insertions, 1 deletions
diff --git a/nixos/modules/services/continuous-integration/github-runner/service.nix b/nixos/modules/services/continuous-integration/github-runner/service.nix
index 535df7f68e076..784aea0edea7b 100644
--- a/nixos/modules/services/continuous-integration/github-runner/service.nix
+++ b/nixos/modules/services/continuous-integration/github-runner/service.nix
@@ -22,7 +22,8 @@ with lib;
 
 let
   workDir = if cfg.workDir == null then runtimeDir else cfg.workDir;
-  package = cfg.package.override { inherit (cfg) nodeRuntimes; };
+  # Support old github-runner versions which don't have the `nodeRuntimes` arg yet.
+  package = cfg.package.override (old: optionalAttrs (hasAttr "nodeRuntimes" old) { inherit (cfg) nodeRuntimes; });
 in
 {
   description = "GitHub Actions runner";