summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorBjørn Forsman <bjorn.forsman@gmail.com>2015-12-24 00:06:40 +0100
committerBjørn Forsman <bjorn.forsman@gmail.com>2015-12-24 00:06:40 +0100
commite0b0b9723c282c6fc181a4428dcbb121a180d631 (patch)
tree6c933cf75cdbd7c6fb9e9a561aeb129f69495607 /nixos/modules
parent79367816a965c3aed93b9fd52658469ad818f82c (diff)
downloadnixpkgs-e0b0b9723c282c6fc181a4428dcbb121a180d631.tar
nixpkgs-e0b0b9723c282c6fc181a4428dcbb121a180d631.tar.gz
nixpkgs-e0b0b9723c282c6fc181a4428dcbb121a180d631.tar.bz2
nixpkgs-e0b0b9723c282c6fc181a4428dcbb121a180d631.tar.lz
nixpkgs-e0b0b9723c282c6fc181a4428dcbb121a180d631.tar.xz
nixpkgs-e0b0b9723c282c6fc181a4428dcbb121a180d631.tar.zst
nixpkgs-e0b0b9723c282c6fc181a4428dcbb121a180d631.zip
nixos/docker-registry: rename 'host' to 'listenAddress'
More descriptive option name.
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/rename.nix1
-rw-r--r--nixos/modules/services/misc/docker-registry.nix6
2 files changed, 4 insertions, 3 deletions
diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix
index 57f86b4812f..b099a528d9b 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 f472e530a70..0a0e160a7cc 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
       '';