Merge pull request #11920 from bjornfor/rename-host-to-listen-address
Rename NixOS option names: 'host' to 'listenAddress'
This commit is contained in:
commit
d807b057ed
@ -14,6 +14,19 @@ with lib;
|
|||||||
(mkRenamedOptionModule [ "networking" "enableWLAN" ] [ "networking" "wireless" "enable" ])
|
(mkRenamedOptionModule [ "networking" "enableWLAN" ] [ "networking" "wireless" "enable" ])
|
||||||
(mkRenamedOptionModule [ "networking" "enableRT73Firmware" ] [ "networking" "enableRalinkFirmware" ])
|
(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.
|
# Old Grub-related options.
|
||||||
(mkRenamedOptionModule [ "boot" "initrd" "extraKernelModules" ] [ "boot" "initrd" "kernelModules" ])
|
(mkRenamedOptionModule [ "boot" "initrd" "extraKernelModules" ] [ "boot" "initrd" "kernelModules" ])
|
||||||
(mkRenamedOptionModule [ "boot" "extraKernelParams" ] [ "boot" "kernelParams" ])
|
(mkRenamedOptionModule [ "boot" "extraKernelParams" ] [ "boot" "kernelParams" ])
|
||||||
|
@ -18,7 +18,7 @@ let
|
|||||||
user "${cfg.user}"
|
user "${cfg.user}"
|
||||||
group "${cfg.group}"
|
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}"''}
|
${optionalString (cfg.network.port != 6600) ''port "${toString cfg.network.port}"''}
|
||||||
|
|
||||||
${cfg.extraConfig}
|
${cfg.extraConfig}
|
||||||
@ -75,7 +75,7 @@ in {
|
|||||||
|
|
||||||
network = {
|
network = {
|
||||||
|
|
||||||
host = mkOption {
|
listenAddress = mkOption {
|
||||||
default = "any";
|
default = "any";
|
||||||
description = ''
|
description = ''
|
||||||
This setting sets the address for the daemon to listen on. Careful attention
|
This setting sets the address for the daemon to listen on. Careful attention
|
||||||
|
@ -7,7 +7,7 @@ let
|
|||||||
|
|
||||||
serverConfig = pkgs.writeText "neo4j-server.properties" ''
|
serverConfig = pkgs.writeText "neo4j-server.properties" ''
|
||||||
org.neo4j.server.database.location=${cfg.dataDir}/data/graph.db
|
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}
|
org.neo4j.server.webserver.port=${toString cfg.port}
|
||||||
${optionalString cfg.enableHttps ''
|
${optionalString cfg.enableHttps ''
|
||||||
org.neo4j.server.webserver.https.enabled=true
|
org.neo4j.server.webserver.https.enabled=true
|
||||||
@ -52,7 +52,7 @@ in {
|
|||||||
type = types.package;
|
type = types.package;
|
||||||
};
|
};
|
||||||
|
|
||||||
host = mkOption {
|
listenAddress = mkOption {
|
||||||
description = "Neo4j listen address.";
|
description = "Neo4j listen address.";
|
||||||
default = "127.0.0.1";
|
default = "127.0.0.1";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
|
@ -15,7 +15,7 @@ in {
|
|||||||
type = types.bool;
|
type = types.bool;
|
||||||
};
|
};
|
||||||
|
|
||||||
host = mkOption {
|
listenAddress = mkOption {
|
||||||
description = "Docker registry host or ip to bind to.";
|
description = "Docker registry host or ip to bind to.";
|
||||||
default = "127.0.0.1";
|
default = "127.0.0.1";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
@ -50,7 +50,7 @@ in {
|
|||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
|
|
||||||
environment = {
|
environment = {
|
||||||
REGISTRY_HOST = cfg.host;
|
REGISTRY_HOST = cfg.listenAddress;
|
||||||
REGISTRY_PORT = toString cfg.port;
|
REGISTRY_PORT = toString cfg.port;
|
||||||
GUNICORN_OPTS = "[--preload]"; # see https://github.com/docker/docker-registry#sqlalchemy
|
GUNICORN_OPTS = "[--preload]"; # see https://github.com/docker/docker-registry#sqlalchemy
|
||||||
STORAGE_PATH = cfg.storagePath;
|
STORAGE_PATH = cfg.storagePath;
|
||||||
@ -65,7 +65,7 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
postStart = ''
|
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;
|
sleep 1;
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
@ -21,7 +21,7 @@ in
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
host = mkOption {
|
listenAddress = mkOption {
|
||||||
type = types.string;
|
type = types.string;
|
||||||
default = "0.0.0.0";
|
default = "0.0.0.0";
|
||||||
description = ''
|
description = ''
|
||||||
@ -115,7 +115,7 @@ in
|
|||||||
ExecStart = ''
|
ExecStart = ''
|
||||||
${pkgs.jre}/bin/java -Xmx${toString cfg.maxMemory}m \
|
${pkgs.jre}/bin/java -Xmx${toString cfg.maxMemory}m \
|
||||||
-Dsubsonic.home=${cfg.home} \
|
-Dsubsonic.home=${cfg.home} \
|
||||||
-Dsubsonic.host=${cfg.host} \
|
-Dsubsonic.host=${cfg.listenAddress} \
|
||||||
-Dsubsonic.port=${toString cfg.port} \
|
-Dsubsonic.port=${toString cfg.port} \
|
||||||
-Dsubsonic.httpsPort=${toString cfg.httpsPort} \
|
-Dsubsonic.httpsPort=${toString cfg.httpsPort} \
|
||||||
-Dsubsonic.contextPath=${cfg.contextPath} \
|
-Dsubsonic.contextPath=${cfg.contextPath} \
|
||||||
|
@ -14,7 +14,7 @@ in {
|
|||||||
description = "Whether to enable cadvisor service.";
|
description = "Whether to enable cadvisor service.";
|
||||||
};
|
};
|
||||||
|
|
||||||
host = mkOption {
|
listenAddress = mkOption {
|
||||||
default = "127.0.0.1";
|
default = "127.0.0.1";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
description = "Cadvisor listening host";
|
description = "Cadvisor listening host";
|
||||||
@ -71,7 +71,7 @@ in {
|
|||||||
after = [ "network.target" "docker.service" "influxdb.service" ];
|
after = [ "network.target" "docker.service" "influxdb.service" ];
|
||||||
|
|
||||||
postStart = mkBefore ''
|
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;
|
sleep 1;
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
@ -79,7 +79,7 @@ in {
|
|||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = ''${pkgs.cadvisor}/bin/cadvisor \
|
ExecStart = ''${pkgs.cadvisor}/bin/cadvisor \
|
||||||
-logtostderr=true \
|
-logtostderr=true \
|
||||||
-listen_ip=${cfg.host} \
|
-listen_ip=${cfg.listenAddress} \
|
||||||
-port=${toString cfg.port} \
|
-port=${toString cfg.port} \
|
||||||
${optionalString (cfg.storageDriver != null) ''
|
${optionalString (cfg.storageDriver != null) ''
|
||||||
-storage_driver ${cfg.storageDriver} \
|
-storage_driver ${cfg.storageDriver} \
|
||||||
|
@ -77,7 +77,7 @@ in {
|
|||||||
type = types.bool;
|
type = types.bool;
|
||||||
};
|
};
|
||||||
|
|
||||||
host = mkOption {
|
listenAddress = mkOption {
|
||||||
description = "Graphite web frontend listen address.";
|
description = "Graphite web frontend listen address.";
|
||||||
default = "127.0.0.1";
|
default = "127.0.0.1";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
@ -121,7 +121,7 @@ in {
|
|||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
};
|
};
|
||||||
|
|
||||||
host = mkOption {
|
listenAddress = mkOption {
|
||||||
description = "Graphite web service listen address.";
|
description = "Graphite web service listen address.";
|
||||||
default = "127.0.0.1";
|
default = "127.0.0.1";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
@ -292,7 +292,7 @@ in {
|
|||||||
};
|
};
|
||||||
|
|
||||||
graphiteUrl = mkOption {
|
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.";
|
description = "Host where graphite service runs.";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
};
|
};
|
||||||
@ -337,7 +337,7 @@ in {
|
|||||||
|
|
||||||
graphiteUrl = mkOption {
|
graphiteUrl = mkOption {
|
||||||
description = "URL to your graphite service.";
|
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;
|
type = types.str;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -452,7 +452,7 @@ in {
|
|||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = ''
|
ExecStart = ''
|
||||||
${pkgs.python27Packages.waitress}/bin/waitress-serve \
|
${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'';
|
--call django.core.handlers.wsgi:WSGIHandler'';
|
||||||
User = "graphite";
|
User = "graphite";
|
||||||
Group = "graphite";
|
Group = "graphite";
|
||||||
@ -494,7 +494,7 @@ in {
|
|||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = ''
|
ExecStart = ''
|
||||||
${pkgs.python27Packages.waitress}/bin/waitress-serve \
|
${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
|
graphite_api.app:app
|
||||||
'';
|
'';
|
||||||
User = "graphite";
|
User = "graphite";
|
||||||
|
@ -11,7 +11,7 @@ let
|
|||||||
|
|
||||||
configFile = pkgs.writeText "statsd.conf" ''
|
configFile = pkgs.writeText "statsd.conf" ''
|
||||||
{
|
{
|
||||||
address: "${cfg.host}",
|
address: "${cfg.listenAddress}",
|
||||||
port: "${toString cfg.port}",
|
port: "${toString cfg.port}",
|
||||||
mgmt_address: "${cfg.mgmt_address}",
|
mgmt_address: "${cfg.mgmt_address}",
|
||||||
mgmt_port: "${toString cfg.mgmt_port}",
|
mgmt_port: "${toString cfg.mgmt_port}",
|
||||||
@ -48,7 +48,7 @@ in
|
|||||||
type = types.bool;
|
type = types.bool;
|
||||||
};
|
};
|
||||||
|
|
||||||
host = mkOption {
|
listenAddress = mkOption {
|
||||||
description = "Address that statsd listens on over UDP";
|
description = "Address that statsd listens on over UDP";
|
||||||
default = "127.0.0.1";
|
default = "127.0.0.1";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
|
@ -19,7 +19,7 @@ in {
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
host = mkOption {
|
listenAddress = mkOption {
|
||||||
type = types.string;
|
type = types.string;
|
||||||
default = "0.0.0.0";
|
default = "0.0.0.0";
|
||||||
description = "IP interface to listen on for http connections.";
|
description = "IP interface to listen on for http connections.";
|
||||||
@ -66,7 +66,7 @@ in {
|
|||||||
"${pkgs.shout}/bin/shout"
|
"${pkgs.shout}/bin/shout"
|
||||||
(if cfg.private then "--private" else "--public")
|
(if cfg.private then "--private" else "--public")
|
||||||
"--port" (toString cfg.port)
|
"--port" (toString cfg.port)
|
||||||
"--host" (toString cfg.host)
|
"--host" (toString cfg.listenAddress)
|
||||||
"--home" shoutHome
|
"--home" shoutHome
|
||||||
];
|
];
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
|
@ -16,7 +16,7 @@ let
|
|||||||
|
|
||||||
listen:
|
listen:
|
||||||
(
|
(
|
||||||
{ host: "${cfg.host}"; port: "${toString cfg.port}"; }
|
{ host: "${cfg.listenAddress}"; port: "${toString cfg.port}"; }
|
||||||
);
|
);
|
||||||
|
|
||||||
${cfg.appendConfig}
|
${cfg.appendConfig}
|
||||||
@ -56,7 +56,7 @@ in
|
|||||||
description = "PID file path for sslh daemon.";
|
description = "PID file path for sslh daemon.";
|
||||||
};
|
};
|
||||||
|
|
||||||
host = mkOption {
|
listenAddress = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
default = config.networking.hostName;
|
default = config.networking.hostName;
|
||||||
description = "Listening hostname.";
|
description = "Listening hostname.";
|
||||||
|
@ -6,7 +6,7 @@ let
|
|||||||
cfg = config.services.elasticsearch;
|
cfg = config.services.elasticsearch;
|
||||||
|
|
||||||
esConfig = ''
|
esConfig = ''
|
||||||
network.host: ${cfg.host}
|
network.host: ${cfg.listenAddress}
|
||||||
network.port: ${toString cfg.port}
|
network.port: ${toString cfg.port}
|
||||||
network.tcp.port: ${toString cfg.tcp_port}
|
network.tcp.port: ${toString cfg.tcp_port}
|
||||||
cluster.name: ${cfg.cluster_name}
|
cluster.name: ${cfg.cluster_name}
|
||||||
@ -43,7 +43,7 @@ in {
|
|||||||
type = types.package;
|
type = types.package;
|
||||||
};
|
};
|
||||||
|
|
||||||
host = mkOption {
|
listenAddress = mkOption {
|
||||||
description = "Elasticsearch listen address.";
|
description = "Elasticsearch listen address.";
|
||||||
default = "127.0.0.1";
|
default = "127.0.0.1";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
@ -142,7 +142,7 @@ in {
|
|||||||
ln -s ${esPlugins}/plugins ${cfg.dataDir}/plugins
|
ln -s ${esPlugins}/plugins ${cfg.dataDir}/plugins
|
||||||
'';
|
'';
|
||||||
postStart = mkBefore ''
|
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
|
sleep 1
|
||||||
done
|
done
|
||||||
'';
|
'';
|
||||||
|
@ -8,7 +8,7 @@ let
|
|||||||
cfgFile = pkgs.writeText "kibana.json" (builtins.toJSON (
|
cfgFile = pkgs.writeText "kibana.json" (builtins.toJSON (
|
||||||
(filterAttrsRecursive (n: v: v != null) ({
|
(filterAttrsRecursive (n: v: v != null) ({
|
||||||
server = {
|
server = {
|
||||||
host = cfg.host;
|
host = cfg.listenAddress;
|
||||||
port = cfg.port;
|
port = cfg.port;
|
||||||
ssl = {
|
ssl = {
|
||||||
cert = cfg.cert;
|
cert = cfg.cert;
|
||||||
@ -44,7 +44,7 @@ in {
|
|||||||
options.services.kibana = {
|
options.services.kibana = {
|
||||||
enable = mkEnableOption "enable kibana service";
|
enable = mkEnableOption "enable kibana service";
|
||||||
|
|
||||||
host = mkOption {
|
listenAddress = mkOption {
|
||||||
description = "Kibana listening host";
|
description = "Kibana listening host";
|
||||||
default = "127.0.0.1";
|
default = "127.0.0.1";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
|
Loading…
Reference in New Issue
Block a user