Add comments to explain about the name defaults

Changed files
+9 -2
nixos
modules
services
continuous-integration
+5 -1
nixos/modules/services/continuous-integration/github-runner.nix
···
in
{
-
options.services.github-runner = import ./github-runner/options.nix (args // { includeNameDefault = true; });
config = mkIf cfg.enable {
services.github-runners.${cfg.name} = cfg;
···
in
{
+
options.services.github-runner = import ./github-runner/options.nix (args // {
+
# Users don't need to specify options.services.github-runner.name; it will default
+
# to the hostname.
+
includeNameDefault = true;
+
});
config = mkIf cfg.enable {
services.github-runners.${cfg.name} = cfg;
+4 -1
nixos/modules/services/continuous-integration/github-runners.nix
···
{
options.services.github-runners = mkOption {
default = {};
-
type = with types; attrsOf (submodule { options = import ./github-runner/options.nix (args // { includeNameDefault = false; }); });
example = {
runner1 = {
enable = true;
···
{
options.services.github-runners = mkOption {
default = {};
+
type = with types; attrsOf (submodule { options = import ./github-runner/options.nix (args // {
+
# services.github-runners.${name}.name doesn't have a default; instead it is set to ${name} below.
+
includeNameDefault = false;
+
}); });
example = {
runner1 = {
enable = true;