Merge pull request #11920 from bjornfor/rename-host-to-listen-address

Rename NixOS option names: 'host' to 'listenAddress'

Changed files
+42 -29
nixos
+13
nixos/modules/rename.nix
···
(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" "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" ])
+
(mkRenamedOptionModule [ "services" "sslh" "host" ] [ "services" "sslh" "listenAddress" ])
+
(mkRenamedOptionModule [ "services" "statsd" "host" ] [ "services" "statsd" "listenAddress" ])
+
(mkRenamedOptionModule [ "services" "subsonic" "host" ] [ "services" "subsonic" "listenAddress" ])
+
# Old Grub-related options.
(mkRenamedOptionModule [ "boot" "initrd" "extraKernelModules" ] [ "boot" "initrd" "kernelModules" ])
(mkRenamedOptionModule [ "boot" "extraKernelParams" ] [ "boot" "kernelParams" ])
+2 -2
nixos/modules/services/audio/mpd.nix
···
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}
···
network = {
-
host = mkOption {
+
listenAddress = mkOption {
default = "any";
description = ''
This setting sets the address for the daemon to listen on. Careful attention
+2 -2
nixos/modules/services/databases/neo4j.nix
···
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
···
type = types.package;
};
-
host = mkOption {
+
listenAddress = mkOption {
description = "Neo4j listen address.";
default = "127.0.0.1";
type = types.str;
+3 -3
nixos/modules/services/misc/docker-registry.nix
···
type = types.bool;
};
-
host = mkOption {
+
listenAddress = mkOption {
description = "Docker registry host or ip to bind to.";
default = "127.0.0.1";
type = types.str;
···
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;
···
};
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
'';
+2 -2
nixos/modules/services/misc/subsonic.nix
···
'';
};
-
host = mkOption {
+
listenAddress = mkOption {
type = types.string;
default = "0.0.0.0";
description = ''
···
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} \
+3 -3
nixos/modules/services/monitoring/cadvisor.nix
···
description = "Whether to enable cadvisor service.";
};
-
host = mkOption {
+
listenAddress = mkOption {
default = "127.0.0.1";
type = types.str;
description = "Cadvisor listening host";
···
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
'';
···
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} \
+6 -6
nixos/modules/services/monitoring/graphite.nix
···
type = types.bool;
};
-
host = mkOption {
+
listenAddress = mkOption {
description = "Graphite web frontend listen address.";
default = "127.0.0.1";
type = types.str;
···
type = types.listOf types.str;
};
-
host = mkOption {
+
listenAddress = mkOption {
description = "Graphite web service listen address.";
default = "127.0.0.1";
type = types.str;
···
};
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;
};
···
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;
};
···
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";
···
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";
+2 -2
nixos/modules/services/monitoring/statsd.nix
···
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}",
···
type = types.bool;
};
-
host = mkOption {
+
listenAddress = mkOption {
description = "Address that statsd listens on over UDP";
default = "127.0.0.1";
type = types.str;
+2 -2
nixos/modules/services/networking/shout.nix
···
'';
};
-
host = mkOption {
+
listenAddress = mkOption {
type = types.string;
default = "0.0.0.0";
description = "IP interface to listen on for http connections.";
···
"${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 = {
+2 -2
nixos/modules/services/networking/sslh.nix
···
listen:
(
-
{ host: "${cfg.host}"; port: "${toString cfg.port}"; }
+
{ host: "${cfg.listenAddress}"; port: "${toString cfg.port}"; }
);
${cfg.appendConfig}
···
description = "PID file path for sslh daemon.";
};
-
host = mkOption {
+
listenAddress = mkOption {
type = types.str;
default = config.networking.hostName;
description = "Listening hostname.";
+3 -3
nixos/modules/services/search/elasticsearch.nix
···
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}
···
type = types.package;
};
-
host = mkOption {
+
listenAddress = mkOption {
description = "Elasticsearch listen address.";
default = "127.0.0.1";
type = types.str;
···
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
'';
+2 -2
nixos/modules/services/search/kibana.nix
···
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;
···
options.services.kibana = {
enable = mkEnableOption "enable kibana service";
-
host = mkOption {
+
listenAddress = mkOption {
description = "Kibana listening host";
default = "127.0.0.1";
type = types.str;