lol

nixos/github-runners: add `nodeRuntimes` option

+13 -2
+2
nixos/doc/manual/release-notes/rl-2311.section.md
··· 199 199 200 200 - `services.prometheus.exporters` has a new [exporter](https://github.com/hipages/php-fpm_exporter) to monitor PHP-FPM processes, see [#240394](https://github.com/NixOS/nixpkgs/pull/240394) for more details. 201 201 202 + - `services.github-runner` / `services.github-runners.<name>` gained the option `nodeRuntimes`. The option defaults to `[ "node20" ]`, i.e., the service supports Node.js 20 GitHub Actions only. The list of Node.js versions accepted by `nodeRuntimes` tracks the versions the upstream GitHub Actions runner supports. See [#249103](https://github.com/NixOS/nixpkgs/pull/249103) for details. 203 + 202 204 - `programs.gnupg.agent.pinentryFlavor` is now set in `/etc/gnupg/gpg-agent.conf`, and will no longer take precedence over a `pinentry-program` set in `~/.gnupg/gpg-agent.conf`. 203 205 204 206 - `wrapHelm` now exposes `passthru.pluginsDir` which can be passed to `helmfile`. For convenience, a top-level package `helmfile-wrapped` has been added, which inherits `passthru.pluginsDir` from `kubernetes-helm-wrapped`. See [#217768](https://github.com/NixOS/nixpkgs/issues/217768) for details.
+8
nixos/modules/services/continuous-integration/github-runner/options.nix
··· 208 208 ''; 209 209 default = null; 210 210 }; 211 + 212 + nodeRuntimes = mkOption { 213 + type = with types; nonEmptyListOf (enum [ "node16" "node20" ]); 214 + default = [ "node20" ]; 215 + description = mdDoc '' 216 + List of Node.js runtimes the runner should support. 217 + ''; 218 + }; 211 219 }
+3 -2
nixos/modules/services/continuous-integration/github-runner/service.nix
··· 22 22 23 23 let 24 24 workDir = if cfg.workDir == null then runtimeDir else cfg.workDir; 25 + package = cfg.package.override { inherit (cfg) nodeRuntimes; }; 25 26 in 26 27 { 27 28 description = "GitHub Actions runner"; ··· 47 48 48 49 serviceConfig = mkMerge [ 49 50 { 50 - ExecStart = "${cfg.package}/bin/Runner.Listener run --startuptype service"; 51 + ExecStart = "${package}/bin/Runner.Listener run --startuptype service"; 51 52 52 53 # Does the following, sequentially: 53 54 # - If the module configuration or the token has changed, purge the state directory, ··· 149 150 else 150 151 args+=(--token "$token") 151 152 fi 152 - ${cfg.package}/bin/Runner.Listener configure "''${args[@]}" 153 + ${package}/bin/Runner.Listener configure "''${args[@]}" 153 154 # Move the automatically created _diag dir to the logs dir 154 155 mkdir -p "$STATE_DIRECTORY/_diag" 155 156 cp -r "$STATE_DIRECTORY/_diag/." "$LOGS_DIRECTORY/"