Merge pull request #41478 from bluescreen303/docker-registry
Small improvements to the docker registry module
This commit is contained in:
commit
31021701ac
@ -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 {
|
in {
|
||||||
options.services.dockerRegistry = {
|
options.services.dockerRegistry = {
|
||||||
@ -91,7 +91,7 @@ in {
|
|||||||
Docker extra registry configuration via environment variables.
|
Docker extra registry configuration via environment variables.
|
||||||
'';
|
'';
|
||||||
default = {};
|
default = {};
|
||||||
type = types.attrsOf types.str;
|
type = types.attrs;
|
||||||
};
|
};
|
||||||
|
|
||||||
enableGarbageCollect = mkEnableOption "garbage collect";
|
enableGarbageCollect = mkEnableOption "garbage collect";
|
||||||
@ -120,6 +120,7 @@ in {
|
|||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
User = "docker-registry";
|
User = "docker-registry";
|
||||||
WorkingDirectory = cfg.storagePath;
|
WorkingDirectory = cfg.storagePath;
|
||||||
|
AmbientCapabilities = mkIf (cfg.port < 1024) "cap_net_bind_service";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user