Commit 388bfcef authored by Vincent Haupert's avatar Vincent Haupert
Browse files

nixos/github-runners: add `nodeRuntimes` option

parent 73babca7
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -199,6 +199,8 @@ The module update takes care of the new config syntax and the data itself (user

- `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.

- `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.

- `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`.

- `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 −0
Original line number Diff line number Diff line
@@ -208,4 +208,12 @@ with lib;
    '';
    default = null;
  };

  nodeRuntimes = mkOption {
    type = with types; nonEmptyListOf (enum [ "node16" "node20" ]);
    default = [ "node20" ];
    description = mdDoc ''
      List of Node.js runtimes the runner should support.
    '';
  };
}
+3 −2
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ with lib;

let
  workDir = if cfg.workDir == null then runtimeDir else cfg.workDir;
  package = cfg.package.override { inherit (cfg) nodeRuntimes; };
in
{
  description = "GitHub Actions runner";
@@ -47,7 +48,7 @@ in

  serviceConfig = mkMerge [
    {
      ExecStart = "${cfg.package}/bin/Runner.Listener run --startuptype service";
      ExecStart = "${package}/bin/Runner.Listener run --startuptype service";

      # Does the following, sequentially:
      # - If the module configuration or the token has changed, purge the state directory,
@@ -149,7 +150,7 @@ in
              else
                args+=(--token "$token")
              fi
              ${cfg.package}/bin/Runner.Listener configure "''${args[@]}"
              ${package}/bin/Runner.Listener configure "''${args[@]}"
              # Move the automatically created _diag dir to the logs dir
              mkdir -p  "$STATE_DIRECTORY/_diag"
              cp    -r  "$STATE_DIRECTORY/_diag/." "$LOGS_DIRECTORY/"