|
|
|
@ -55,19 +55,23 @@ with lib; |
|
|
|
|
example = "/run/secrets/github-runner/nixos.token"; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
name = mkOption { |
|
|
|
|
name = let |
|
|
|
|
# Same pattern as for `networking.hostName` |
|
|
|
|
type = types.strMatching "^$|^[[:alnum:]]([[:alnum:]_-]{0,61}[[:alnum:]])?$"; |
|
|
|
|
baseType = types.strMatching "^$|^[[:alnum:]]([[:alnum:]_-]{0,61}[[:alnum:]])?$"; |
|
|
|
|
in mkOption { |
|
|
|
|
type = if includeNameDefault then baseType else types.nullOr baseType; |
|
|
|
|
description = lib.mdDoc '' |
|
|
|
|
Name of the runner to configure. Defaults to the hostname. |
|
|
|
|
|
|
|
|
|
Changing this option triggers a new runner registration. |
|
|
|
|
''; |
|
|
|
|
example = "nixos"; |
|
|
|
|
} // lib.optionalAttrs includeNameDefault { |
|
|
|
|
} // (if includeNameDefault then { |
|
|
|
|
default = config.networking.hostName; |
|
|
|
|
defaultText = literalExpression "config.networking.hostName"; |
|
|
|
|
}; |
|
|
|
|
} else { |
|
|
|
|
default = null; |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
runnerGroup = mkOption { |
|
|
|
|
type = types.nullOr types.str; |
|
|
|
|