From e0b0b9723c282c6fc181a4428dcbb121a180d631 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Thu, 24 Dec 2015 00:06:40 +0100 Subject: [PATCH] nixos/docker-registry: rename 'host' to 'listenAddress' More descriptive option name. --- nixos/modules/rename.nix | 1 + nixos/modules/services/misc/docker-registry.nix | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index 57f86b4812f4..b099a528d9b6 100644 --- a/nixos/modules/rename.nix +++ b/nixos/modules/rename.nix @@ -14,6 +14,7 @@ with lib; (mkRenamedOptionModule [ "networking" "enableWLAN" ] [ "networking" "wireless" "enable" ]) (mkRenamedOptionModule [ "networking" "enableRT73Firmware" ] [ "networking" "enableRalinkFirmware" ]) + (mkRenamedOptionModule [ "services" "dockerRegistry" "host" ] [ "services" "dockerRegistry" "listenAddress" ]) (mkRenamedOptionModule [ "services" "mpd" "network" "host" ] [ "services" "mpd" "network" "listenAddress" ]) (mkRenamedOptionModule [ "services" "neo4j" "host" ] [ "services" "neo4j" "listenAddress" ]) diff --git a/nixos/modules/services/misc/docker-registry.nix b/nixos/modules/services/misc/docker-registry.nix index f472e530a70b..0a0e160a7cc3 100644 --- a/nixos/modules/services/misc/docker-registry.nix +++ b/nixos/modules/services/misc/docker-registry.nix @@ -15,7 +15,7 @@ in { type = types.bool; }; - host = mkOption { + listenAddress = mkOption { description = "Docker registry host or ip to bind to."; default = "127.0.0.1"; type = types.str; @@ -50,7 +50,7 @@ in { after = [ "network.target" ]; environment = { - REGISTRY_HOST = cfg.host; + REGISTRY_HOST = cfg.listenAddress; REGISTRY_PORT = toString cfg.port; GUNICORN_OPTS = "[--preload]"; # see https://github.com/docker/docker-registry#sqlalchemy STORAGE_PATH = cfg.storagePath; @@ -65,7 +65,7 @@ in { }; postStart = '' - until ${pkgs.curl}/bin/curl -s -o /dev/null 'http://${cfg.host}:${toString cfg.port}/'; do + until ${pkgs.curl}/bin/curl -s -o /dev/null 'http://${cfg.listenAddress}:${toString cfg.port}/'; do sleep 1; done '';