diff --git a/modules/programs/docker-cli.nix b/modules/programs/docker-cli.nix index 668ef7f7..937b9101 100644 --- a/modules/programs/docker-cli.nix +++ b/modules/programs/docker-cli.nix @@ -32,6 +32,38 @@ in ''; }; + contexts = mkOption { + type = lib.types.attrsOf ( + lib.types.submodule ( + { name, config, ... }: + { + freeformType = jsonFormat.type; + options = { + Name = mkOption { + type = lib.types.str; + readOnly = true; + description = "Name of the Docker context. Defaults to the attribute name (the in programs.docker-cli.contexts.). Overriding requires lib.mkForce."; + }; + }; + config.Name = name; + } + ) + ); + default = { }; + example = lib.literalExpression '' + { + example = { + Metadata = { Description = "example1"; }; + Endpoints.docker.Host = "unix://example2"; + }; + } + ''; + description = '' + Attribute set of Docker context configurations. Each attribute name becomes the context Name; overriding requires lib.mkForce. See: +