nixos/github-runner: use apply to override package
These changes allow users to reference the final package
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user