From 873a9202f65d5cdcf80307e5f8f3e6dd5c341fe1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Wed, 23 Dec 2015 23:58:42 +0100 Subject: [PATCH 01/11] nixos/neo4j: rename 'host' to 'listenAddress' More descriptive option name. --- nixos/modules/rename.nix | 2 ++ nixos/modules/services/databases/neo4j.nix | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index 28ac1c3e888..26b7c9af53c 100644 --- a/nixos/modules/rename.nix +++ b/nixos/modules/rename.nix @@ -14,6 +14,8 @@ with lib; (mkRenamedOptionModule [ "networking" "enableWLAN" ] [ "networking" "wireless" "enable" ]) (mkRenamedOptionModule [ "networking" "enableRT73Firmware" ] [ "networking" "enableRalinkFirmware" ]) + (mkRenamedOptionModule [ "services" "neo4j" "host" ] [ "services" "neo4j" "listenAddress" ]) + # Old Grub-related options. (mkRenamedOptionModule [ "boot" "initrd" "extraKernelModules" ] [ "boot" "initrd" "kernelModules" ]) (mkRenamedOptionModule [ "boot" "extraKernelParams" ] [ "boot" "kernelParams" ]) diff --git a/nixos/modules/services/databases/neo4j.nix b/nixos/modules/services/databases/neo4j.nix index 3cf22db7da2..1413839ce22 100644 --- a/nixos/modules/services/databases/neo4j.nix +++ b/nixos/modules/services/databases/neo4j.nix @@ -7,7 +7,7 @@ let serverConfig = pkgs.writeText "neo4j-server.properties" '' org.neo4j.server.database.location=${cfg.dataDir}/data/graph.db - org.neo4j.server.webserver.address=${cfg.host} + org.neo4j.server.webserver.address=${cfg.listenAddress} org.neo4j.server.webserver.port=${toString cfg.port} ${optionalString cfg.enableHttps '' org.neo4j.server.webserver.https.enabled=true @@ -52,7 +52,7 @@ in { type = types.package; }; - host = mkOption { + listenAddress = mkOption { description = "Neo4j listen address."; default = "127.0.0.1"; type = types.str; From 79367816a965c3aed93b9fd52658469ad818f82c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Thu, 24 Dec 2015 00:04:04 +0100 Subject: [PATCH 02/11] nixos/mpd: rename 'host' to 'listenAddress' More descriptive option name. --- nixos/modules/rename.nix | 1 + nixos/modules/services/audio/mpd.nix | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index 26b7c9af53c..57f86b4812f 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" "mpd" "network" "host" ] [ "services" "mpd" "network" "listenAddress" ]) (mkRenamedOptionModule [ "services" "neo4j" "host" ] [ "services" "neo4j" "listenAddress" ]) # Old Grub-related options. diff --git a/nixos/modules/services/audio/mpd.nix b/nixos/modules/services/audio/mpd.nix index 5515f827b29..5d5fef66794 100644 --- a/nixos/modules/services/audio/mpd.nix +++ b/nixos/modules/services/audio/mpd.nix @@ -18,7 +18,7 @@ let user "${cfg.user}" group "${cfg.group}" - ${optionalString (cfg.network.host != "any") ''bind_to_address "${cfg.network.host}"''} + ${optionalString (cfg.network.listenAddress != "any") ''bind_to_address "${cfg.network.listenAddress}"''} ${optionalString (cfg.network.port != 6600) ''port "${toString cfg.network.port}"''} ${cfg.extraConfig} @@ -75,7 +75,7 @@ in { network = { - host = mkOption { + listenAddress = mkOption { default = "any"; description = '' This setting sets the address for the daemon to listen on. Careful attention 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 03/11] 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 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 ''; From 6b10df7eaa28e7f1d107603f9e252bc6f1f78acd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Thu, 24 Dec 2015 00:13:15 +0100 Subject: [PATCH 04/11] nixos/subsonic: rename 'host' to 'listenAddress' More descriptive option name. --- nixos/modules/rename.nix | 1 + nixos/modules/services/misc/subsonic.nix | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index b099a528d9b..c9e91cca2ec 100644 --- a/nixos/modules/rename.nix +++ b/nixos/modules/rename.nix @@ -17,6 +17,7 @@ with lib; (mkRenamedOptionModule [ "services" "dockerRegistry" "host" ] [ "services" "dockerRegistry" "listenAddress" ]) (mkRenamedOptionModule [ "services" "mpd" "network" "host" ] [ "services" "mpd" "network" "listenAddress" ]) (mkRenamedOptionModule [ "services" "neo4j" "host" ] [ "services" "neo4j" "listenAddress" ]) + (mkRenamedOptionModule [ "services" "subsonic" "host" ] [ "services" "subsonic" "listenAddress" ]) # Old Grub-related options. (mkRenamedOptionModule [ "boot" "initrd" "extraKernelModules" ] [ "boot" "initrd" "kernelModules" ]) diff --git a/nixos/modules/services/misc/subsonic.nix b/nixos/modules/services/misc/subsonic.nix index 4d164ad8d65..2831e95b948 100644 --- a/nixos/modules/services/misc/subsonic.nix +++ b/nixos/modules/services/misc/subsonic.nix @@ -21,7 +21,7 @@ in ''; }; - host = mkOption { + listenAddress = mkOption { type = types.string; default = "0.0.0.0"; description = '' @@ -115,7 +115,7 @@ in ExecStart = '' ${pkgs.jre}/bin/java -Xmx${toString cfg.maxMemory}m \ -Dsubsonic.home=${cfg.home} \ - -Dsubsonic.host=${cfg.host} \ + -Dsubsonic.host=${cfg.listenAddress} \ -Dsubsonic.port=${toString cfg.port} \ -Dsubsonic.httpsPort=${toString cfg.httpsPort} \ -Dsubsonic.contextPath=${cfg.contextPath} \ From 38ca880612ff37695659b8b56af70553b2193f5f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Thu, 24 Dec 2015 00:14:40 +0100 Subject: [PATCH 05/11] nixos/cadvisor: rename 'host' to 'listenAddress' More descriptive option name. --- nixos/modules/rename.nix | 1 + nixos/modules/services/monitoring/cadvisor.nix | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index c9e91cca2ec..6522cc240bb 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" "cadvisor" "host" ] [ "services" "cadvisor" "listenAddress" ]) (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/monitoring/cadvisor.nix b/nixos/modules/services/monitoring/cadvisor.nix index b6cf397f35c..425e0ee9230 100644 --- a/nixos/modules/services/monitoring/cadvisor.nix +++ b/nixos/modules/services/monitoring/cadvisor.nix @@ -14,7 +14,7 @@ in { description = "Whether to enable cadvisor service."; }; - host = mkOption { + listenAddress = mkOption { default = "127.0.0.1"; type = types.str; description = "Cadvisor listening host"; @@ -71,7 +71,7 @@ in { after = [ "network.target" "docker.service" "influxdb.service" ]; postStart = mkBefore '' - until ${pkgs.curl}/bin/curl -s -o /dev/null 'http://${cfg.host}:${toString cfg.port}/containers/'; do + until ${pkgs.curl}/bin/curl -s -o /dev/null 'http://${cfg.listenAddress}:${toString cfg.port}/containers/'; do sleep 1; done ''; @@ -79,7 +79,7 @@ in { serviceConfig = { ExecStart = ''${pkgs.cadvisor}/bin/cadvisor \ -logtostderr=true \ - -listen_ip=${cfg.host} \ + -listen_ip=${cfg.listenAddress} \ -port=${toString cfg.port} \ ${optionalString (cfg.storageDriver != null) '' -storage_driver ${cfg.storageDriver} \ From 8b9f3c8c35eb3d8c85cf168618b264c76bca687b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Thu, 24 Dec 2015 00:20:39 +0100 Subject: [PATCH 06/11] nixos/graphite: rename 'host' to 'listenAddress' More descriptive option name. --- nixos/modules/rename.nix | 2 ++ nixos/modules/services/monitoring/graphite.nix | 12 ++++++------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index 6522cc240bb..88d33aac7d0 100644 --- a/nixos/modules/rename.nix +++ b/nixos/modules/rename.nix @@ -16,6 +16,8 @@ with lib; (mkRenamedOptionModule [ "services" "cadvisor" "host" ] [ "services" "cadvisor" "listenAddress" ]) (mkRenamedOptionModule [ "services" "dockerRegistry" "host" ] [ "services" "dockerRegistry" "listenAddress" ]) + (mkRenamedOptionModule [ "services" "graphite" "api" "host" ] [ "services" "graphite" "api" "listenAddress" ]) + (mkRenamedOptionModule [ "services" "graphite" "web" "host" ] [ "services" "graphite" "web" "listenAddress" ]) (mkRenamedOptionModule [ "services" "mpd" "network" "host" ] [ "services" "mpd" "network" "listenAddress" ]) (mkRenamedOptionModule [ "services" "neo4j" "host" ] [ "services" "neo4j" "listenAddress" ]) (mkRenamedOptionModule [ "services" "subsonic" "host" ] [ "services" "subsonic" "listenAddress" ]) diff --git a/nixos/modules/services/monitoring/graphite.nix b/nixos/modules/services/monitoring/graphite.nix index 57abb959fdb..c4ccde5d528 100644 --- a/nixos/modules/services/monitoring/graphite.nix +++ b/nixos/modules/services/monitoring/graphite.nix @@ -77,7 +77,7 @@ in { type = types.bool; }; - host = mkOption { + listenAddress = mkOption { description = "Graphite web frontend listen address."; default = "127.0.0.1"; type = types.str; @@ -121,7 +121,7 @@ in { type = types.listOf types.str; }; - host = mkOption { + listenAddress = mkOption { description = "Graphite web service listen address."; default = "127.0.0.1"; type = types.str; @@ -292,7 +292,7 @@ in { }; graphiteUrl = mkOption { - default = "http://${cfg.web.host}:${toString cfg.web.port}"; + default = "http://${cfg.web.listenAddress}:${toString cfg.web.port}"; description = "Host where graphite service runs."; type = types.str; }; @@ -337,7 +337,7 @@ in { graphiteUrl = mkOption { description = "URL to your graphite service."; - default = "http://${cfg.web.host}:${toString cfg.web.port}"; + default = "http://${cfg.web.listenAddress}:${toString cfg.web.port}"; type = types.str; }; @@ -452,7 +452,7 @@ in { serviceConfig = { ExecStart = '' ${pkgs.python27Packages.waitress}/bin/waitress-serve \ - --host=${cfg.web.host} --port=${toString cfg.web.port} \ + --host=${cfg.web.listenAddress} --port=${toString cfg.web.port} \ --call django.core.handlers.wsgi:WSGIHandler''; User = "graphite"; Group = "graphite"; @@ -494,7 +494,7 @@ in { serviceConfig = { ExecStart = '' ${pkgs.python27Packages.waitress}/bin/waitress-serve \ - --host=${cfg.api.host} --port=${toString cfg.api.port} \ + --host=${cfg.api.listenAddress} --port=${toString cfg.api.port} \ graphite_api.app:app ''; User = "graphite"; From 19aed49163da022eb0d7b6820bf19097fefa2dc3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Thu, 24 Dec 2015 00:20:56 +0100 Subject: [PATCH 07/11] nixos/statsd: rename 'host' to 'listenAddress' More descriptive option name. --- nixos/modules/rename.nix | 1 + nixos/modules/services/monitoring/statsd.nix | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index 88d33aac7d0..87aa25f883f 100644 --- a/nixos/modules/rename.nix +++ b/nixos/modules/rename.nix @@ -20,6 +20,7 @@ with lib; (mkRenamedOptionModule [ "services" "graphite" "web" "host" ] [ "services" "graphite" "web" "listenAddress" ]) (mkRenamedOptionModule [ "services" "mpd" "network" "host" ] [ "services" "mpd" "network" "listenAddress" ]) (mkRenamedOptionModule [ "services" "neo4j" "host" ] [ "services" "neo4j" "listenAddress" ]) + (mkRenamedOptionModule [ "services" "statsd" "host" ] [ "services" "statsd" "listenAddress" ]) (mkRenamedOptionModule [ "services" "subsonic" "host" ] [ "services" "subsonic" "listenAddress" ]) # Old Grub-related options. diff --git a/nixos/modules/services/monitoring/statsd.nix b/nixos/modules/services/monitoring/statsd.nix index 39fabc27d6c..df2adb9f276 100644 --- a/nixos/modules/services/monitoring/statsd.nix +++ b/nixos/modules/services/monitoring/statsd.nix @@ -11,7 +11,7 @@ let configFile = pkgs.writeText "statsd.conf" '' { - address: "${cfg.host}", + address: "${cfg.listenAddress}", port: "${toString cfg.port}", mgmt_address: "${cfg.mgmt_address}", mgmt_port: "${toString cfg.mgmt_port}", @@ -48,7 +48,7 @@ in type = types.bool; }; - host = mkOption { + listenAddress = mkOption { description = "Address that statsd listens on over UDP"; default = "127.0.0.1"; type = types.str; From 6c2fc3a5ac7e059cefa2cd0248acc9a2cb88be79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Thu, 24 Dec 2015 00:22:47 +0100 Subject: [PATCH 08/11] nixos/shout: rename 'host' to 'listenAddress' More descriptive option name. --- nixos/modules/rename.nix | 1 + nixos/modules/services/networking/shout.nix | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index 87aa25f883f..266aa13e60b 100644 --- a/nixos/modules/rename.nix +++ b/nixos/modules/rename.nix @@ -20,6 +20,7 @@ with lib; (mkRenamedOptionModule [ "services" "graphite" "web" "host" ] [ "services" "graphite" "web" "listenAddress" ]) (mkRenamedOptionModule [ "services" "mpd" "network" "host" ] [ "services" "mpd" "network" "listenAddress" ]) (mkRenamedOptionModule [ "services" "neo4j" "host" ] [ "services" "neo4j" "listenAddress" ]) + (mkRenamedOptionModule [ "services" "shout" "host" ] [ "services" "shout" "listenAddress" ]) (mkRenamedOptionModule [ "services" "statsd" "host" ] [ "services" "statsd" "listenAddress" ]) (mkRenamedOptionModule [ "services" "subsonic" "host" ] [ "services" "subsonic" "listenAddress" ]) diff --git a/nixos/modules/services/networking/shout.nix b/nixos/modules/services/networking/shout.nix index fe3cba8f149..f069fe7bec9 100644 --- a/nixos/modules/services/networking/shout.nix +++ b/nixos/modules/services/networking/shout.nix @@ -19,7 +19,7 @@ in { ''; }; - host = mkOption { + listenAddress = mkOption { type = types.string; default = "0.0.0.0"; description = "IP interface to listen on for http connections."; @@ -66,7 +66,7 @@ in { "${pkgs.shout}/bin/shout" (if cfg.private then "--private" else "--public") "--port" (toString cfg.port) - "--host" (toString cfg.host) + "--host" (toString cfg.listenAddress) "--home" shoutHome ]; serviceConfig = { From 46924e77a2c1c9bf0f018a8dc9d878958e243d20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Thu, 24 Dec 2015 00:23:51 +0100 Subject: [PATCH 09/11] nixos/sslh: rename 'host' to 'listenAddress' More descriptive option name. --- nixos/modules/rename.nix | 1 + nixos/modules/services/networking/sslh.nix | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index 266aa13e60b..f406c29753f 100644 --- a/nixos/modules/rename.nix +++ b/nixos/modules/rename.nix @@ -21,6 +21,7 @@ with lib; (mkRenamedOptionModule [ "services" "mpd" "network" "host" ] [ "services" "mpd" "network" "listenAddress" ]) (mkRenamedOptionModule [ "services" "neo4j" "host" ] [ "services" "neo4j" "listenAddress" ]) (mkRenamedOptionModule [ "services" "shout" "host" ] [ "services" "shout" "listenAddress" ]) + (mkRenamedOptionModule [ "services" "sslh" "host" ] [ "services" "sslh" "listenAddress" ]) (mkRenamedOptionModule [ "services" "statsd" "host" ] [ "services" "statsd" "listenAddress" ]) (mkRenamedOptionModule [ "services" "subsonic" "host" ] [ "services" "subsonic" "listenAddress" ]) diff --git a/nixos/modules/services/networking/sslh.nix b/nixos/modules/services/networking/sslh.nix index c87fe914df8..bd584a3a85d 100644 --- a/nixos/modules/services/networking/sslh.nix +++ b/nixos/modules/services/networking/sslh.nix @@ -16,7 +16,7 @@ let listen: ( - { host: "${cfg.host}"; port: "${toString cfg.port}"; } + { host: "${cfg.listenAddress}"; port: "${toString cfg.port}"; } ); ${cfg.appendConfig} @@ -56,7 +56,7 @@ in description = "PID file path for sslh daemon."; }; - host = mkOption { + listenAddress = mkOption { type = types.str; default = config.networking.hostName; description = "Listening hostname."; From 7334ecd41a62c59299598ab89f92ad1b56abecb3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Thu, 24 Dec 2015 00:28:09 +0100 Subject: [PATCH 10/11] nixos/elasticsearch: rename 'host' to 'listenAddress' More descriptive option name. --- nixos/modules/rename.nix | 1 + nixos/modules/services/search/elasticsearch.nix | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index f406c29753f..2e1a264263f 100644 --- a/nixos/modules/rename.nix +++ b/nixos/modules/rename.nix @@ -16,6 +16,7 @@ with lib; (mkRenamedOptionModule [ "services" "cadvisor" "host" ] [ "services" "cadvisor" "listenAddress" ]) (mkRenamedOptionModule [ "services" "dockerRegistry" "host" ] [ "services" "dockerRegistry" "listenAddress" ]) + (mkRenamedOptionModule [ "services" "elasticsearch" "host" ] [ "services" "elasticsearch" "listenAddress" ]) (mkRenamedOptionModule [ "services" "graphite" "api" "host" ] [ "services" "graphite" "api" "listenAddress" ]) (mkRenamedOptionModule [ "services" "graphite" "web" "host" ] [ "services" "graphite" "web" "listenAddress" ]) (mkRenamedOptionModule [ "services" "mpd" "network" "host" ] [ "services" "mpd" "network" "listenAddress" ]) diff --git a/nixos/modules/services/search/elasticsearch.nix b/nixos/modules/services/search/elasticsearch.nix index 3436bd01d84..b3f0a5251d7 100644 --- a/nixos/modules/services/search/elasticsearch.nix +++ b/nixos/modules/services/search/elasticsearch.nix @@ -6,7 +6,7 @@ let cfg = config.services.elasticsearch; esConfig = '' - network.host: ${cfg.host} + network.host: ${cfg.listenAddress} network.port: ${toString cfg.port} network.tcp.port: ${toString cfg.tcp_port} cluster.name: ${cfg.cluster_name} @@ -43,7 +43,7 @@ in { type = types.package; }; - host = mkOption { + listenAddress = mkOption { description = "Elasticsearch listen address."; default = "127.0.0.1"; type = types.str; @@ -142,7 +142,7 @@ in { ln -s ${esPlugins}/plugins ${cfg.dataDir}/plugins ''; postStart = mkBefore '' - until ${pkgs.curl}/bin/curl -s -o /dev/null ${cfg.host}:${toString cfg.port}; do + until ${pkgs.curl}/bin/curl -s -o /dev/null ${cfg.listenAddress}:${toString cfg.port}; do sleep 1 done ''; From c7c3c95d92832b5a13524897e7b5583c98201a1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= Date: Thu, 24 Dec 2015 00:28:27 +0100 Subject: [PATCH 11/11] nixos/kibana: rename 'host' to 'listenAddress' More descriptive option name. --- nixos/modules/rename.nix | 1 + nixos/modules/services/search/kibana.nix | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index 2e1a264263f..63ff2019d88 100644 --- a/nixos/modules/rename.nix +++ b/nixos/modules/rename.nix @@ -19,6 +19,7 @@ with lib; (mkRenamedOptionModule [ "services" "elasticsearch" "host" ] [ "services" "elasticsearch" "listenAddress" ]) (mkRenamedOptionModule [ "services" "graphite" "api" "host" ] [ "services" "graphite" "api" "listenAddress" ]) (mkRenamedOptionModule [ "services" "graphite" "web" "host" ] [ "services" "graphite" "web" "listenAddress" ]) + (mkRenamedOptionModule [ "services" "kibana" "host" ] [ "services" "kibana" "listenAddress" ]) (mkRenamedOptionModule [ "services" "mpd" "network" "host" ] [ "services" "mpd" "network" "listenAddress" ]) (mkRenamedOptionModule [ "services" "neo4j" "host" ] [ "services" "neo4j" "listenAddress" ]) (mkRenamedOptionModule [ "services" "shout" "host" ] [ "services" "shout" "listenAddress" ]) diff --git a/nixos/modules/services/search/kibana.nix b/nixos/modules/services/search/kibana.nix index f47ab8f5586..f9071ef66e7 100644 --- a/nixos/modules/services/search/kibana.nix +++ b/nixos/modules/services/search/kibana.nix @@ -8,7 +8,7 @@ let cfgFile = pkgs.writeText "kibana.json" (builtins.toJSON ( (filterAttrsRecursive (n: v: v != null) ({ server = { - host = cfg.host; + host = cfg.listenAddress; port = cfg.port; ssl = { cert = cfg.cert; @@ -44,7 +44,7 @@ in { options.services.kibana = { enable = mkEnableOption "enable kibana service"; - host = mkOption { + listenAddress = mkOption { description = "Kibana listening host"; default = "127.0.0.1"; type = types.str;