nixos/github-runners: add noDefaultLabels option

Add option `noDefaultLabels` which controls the `--no-default-labels`
switch passed to the configure script.
This commit is contained in:
Vincent Haupert
2024-01-22 13:29:45 +01:00
parent ae140cd468
commit a9c807496f
3 changed files with 30 additions and 2 deletions

View File

@@ -112,7 +112,8 @@ with lib;
extraLabels = mkOption {
type = types.listOf types.str;
description = mdDoc ''
Extra labels in addition to the default (`["self-hosted", "Linux", "X64"]`).
Extra labels in addition to the default.
Requires a non-empty list if the `noDefaultLabels` option is used.
Changing this option triggers a new runner registration.
'';
@@ -120,6 +121,16 @@ with lib;
default = [ ];
};
noDefaultLabels = mkOption {
type = types.bool;
description = mdDoc ''
Disables adding the default labels. Also see the `extraLabels` option.
Changing this option triggers a new runner registration.
'';
default = false;
};
replace = mkOption {
type = types.bool;
description = mdDoc ''