Merge pull request #41478 from bluescreen303/docker-registry

Small improvements to the docker registry module
This commit is contained in:
Matthew Justin Bauer 2018-06-20 21:45:56 -04:00 committed by GitHub
commit 31021701ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -42,7 +42,7 @@ let
};
};
configFile = pkgs.writeText "docker-registry-config.yml" (builtins.toJSON (registryConfig // cfg.extraConfig));
configFile = pkgs.writeText "docker-registry-config.yml" (builtins.toJSON (recursiveUpdate registryConfig cfg.extraConfig));
in {
options.services.dockerRegistry = {
@ -91,7 +91,7 @@ in {
Docker extra registry configuration via environment variables.
'';
default = {};
type = types.attrsOf types.str;
type = types.attrs;
};
enableGarbageCollect = mkEnableOption "garbage collect";
@ -120,6 +120,7 @@ in {
serviceConfig = {
User = "docker-registry";
WorkingDirectory = cfg.storagePath;
AmbientCapabilities = mkIf (cfg.port < 1024) "cap_net_bind_service";
};
};