nixos/github-runner: use apply to override package

These changes allow users to reference the final package
This commit is contained in:
name_snrl
2025-07-26 03:13:24 +09:00
parent dd386adc75
commit 5d57f60991
2 changed files with 8 additions and 8 deletions

View File

@@ -26,7 +26,7 @@
default = { };
type = lib.types.attrsOf (
lib.types.submodule (
{ name, ... }:
{ name, config, ... }:
{
options = {
enable = lib.mkOption {
@@ -186,7 +186,11 @@
default = { };
};
package = lib.mkPackageOption pkgs "github-runner" { };
package = lib.mkPackageOption pkgs "github-runner" { } // {
apply =
# Support old github-runner versions which don't have the `nodeRuntimes` arg yet.
pkg: pkg.override (old: lib.optionalAttrs (old ? nodeRuntimes) { inherit (config) nodeRuntimes; });
};
ephemeral = lib.mkOption {
type = lib.types.bool;