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

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

+42 -29
+13
nixos/modules/rename.nix
··· 14 (mkRenamedOptionModule [ "networking" "enableWLAN" ] [ "networking" "wireless" "enable" ]) 15 (mkRenamedOptionModule [ "networking" "enableRT73Firmware" ] [ "networking" "enableRalinkFirmware" ]) 16 17 # Old Grub-related options. 18 (mkRenamedOptionModule [ "boot" "initrd" "extraKernelModules" ] [ "boot" "initrd" "kernelModules" ]) 19 (mkRenamedOptionModule [ "boot" "extraKernelParams" ] [ "boot" "kernelParams" ])
··· 14 (mkRenamedOptionModule [ "networking" "enableWLAN" ] [ "networking" "wireless" "enable" ]) 15 (mkRenamedOptionModule [ "networking" "enableRT73Firmware" ] [ "networking" "enableRalinkFirmware" ]) 16 17 + (mkRenamedOptionModule [ "services" "cadvisor" "host" ] [ "services" "cadvisor" "listenAddress" ]) 18 + (mkRenamedOptionModule [ "services" "dockerRegistry" "host" ] [ "services" "dockerRegistry" "listenAddress" ]) 19 + (mkRenamedOptionModule [ "services" "elasticsearch" "host" ] [ "services" "elasticsearch" "listenAddress" ]) 20 + (mkRenamedOptionModule [ "services" "graphite" "api" "host" ] [ "services" "graphite" "api" "listenAddress" ]) 21 + (mkRenamedOptionModule [ "services" "graphite" "web" "host" ] [ "services" "graphite" "web" "listenAddress" ]) 22 + (mkRenamedOptionModule [ "services" "kibana" "host" ] [ "services" "kibana" "listenAddress" ]) 23 + (mkRenamedOptionModule [ "services" "mpd" "network" "host" ] [ "services" "mpd" "network" "listenAddress" ]) 24 + (mkRenamedOptionModule [ "services" "neo4j" "host" ] [ "services" "neo4j" "listenAddress" ]) 25 + (mkRenamedOptionModule [ "services" "shout" "host" ] [ "services" "shout" "listenAddress" ]) 26 + (mkRenamedOptionModule [ "services" "sslh" "host" ] [ "services" "sslh" "listenAddress" ]) 27 + (mkRenamedOptionModule [ "services" "statsd" "host" ] [ "services" "statsd" "listenAddress" ]) 28 + (mkRenamedOptionModule [ "services" "subsonic" "host" ] [ "services" "subsonic" "listenAddress" ]) 29 + 30 # Old Grub-related options. 31 (mkRenamedOptionModule [ "boot" "initrd" "extraKernelModules" ] [ "boot" "initrd" "kernelModules" ]) 32 (mkRenamedOptionModule [ "boot" "extraKernelParams" ] [ "boot" "kernelParams" ])
+2 -2
nixos/modules/services/audio/mpd.nix
··· 18 user "${cfg.user}" 19 group "${cfg.group}" 20 21 - ${optionalString (cfg.network.host != "any") ''bind_to_address "${cfg.network.host}"''} 22 ${optionalString (cfg.network.port != 6600) ''port "${toString cfg.network.port}"''} 23 24 ${cfg.extraConfig} ··· 75 76 network = { 77 78 - host = mkOption { 79 default = "any"; 80 description = '' 81 This setting sets the address for the daemon to listen on. Careful attention
··· 18 user "${cfg.user}" 19 group "${cfg.group}" 20 21 + ${optionalString (cfg.network.listenAddress != "any") ''bind_to_address "${cfg.network.listenAddress}"''} 22 ${optionalString (cfg.network.port != 6600) ''port "${toString cfg.network.port}"''} 23 24 ${cfg.extraConfig} ··· 75 76 network = { 77 78 + listenAddress = mkOption { 79 default = "any"; 80 description = '' 81 This setting sets the address for the daemon to listen on. Careful attention
+2 -2
nixos/modules/services/databases/neo4j.nix
··· 7 8 serverConfig = pkgs.writeText "neo4j-server.properties" '' 9 org.neo4j.server.database.location=${cfg.dataDir}/data/graph.db 10 - org.neo4j.server.webserver.address=${cfg.host} 11 org.neo4j.server.webserver.port=${toString cfg.port} 12 ${optionalString cfg.enableHttps '' 13 org.neo4j.server.webserver.https.enabled=true ··· 52 type = types.package; 53 }; 54 55 - host = mkOption { 56 description = "Neo4j listen address."; 57 default = "127.0.0.1"; 58 type = types.str;
··· 7 8 serverConfig = pkgs.writeText "neo4j-server.properties" '' 9 org.neo4j.server.database.location=${cfg.dataDir}/data/graph.db 10 + org.neo4j.server.webserver.address=${cfg.listenAddress} 11 org.neo4j.server.webserver.port=${toString cfg.port} 12 ${optionalString cfg.enableHttps '' 13 org.neo4j.server.webserver.https.enabled=true ··· 52 type = types.package; 53 }; 54 55 + listenAddress = mkOption { 56 description = "Neo4j listen address."; 57 default = "127.0.0.1"; 58 type = types.str;
+3 -3
nixos/modules/services/misc/docker-registry.nix
··· 15 type = types.bool; 16 }; 17 18 - host = mkOption { 19 description = "Docker registry host or ip to bind to."; 20 default = "127.0.0.1"; 21 type = types.str; ··· 50 after = [ "network.target" ]; 51 52 environment = { 53 - REGISTRY_HOST = cfg.host; 54 REGISTRY_PORT = toString cfg.port; 55 GUNICORN_OPTS = "[--preload]"; # see https://github.com/docker/docker-registry#sqlalchemy 56 STORAGE_PATH = cfg.storagePath; ··· 65 }; 66 67 postStart = '' 68 - until ${pkgs.curl}/bin/curl -s -o /dev/null 'http://${cfg.host}:${toString cfg.port}/'; do 69 sleep 1; 70 done 71 '';
··· 15 type = types.bool; 16 }; 17 18 + listenAddress = mkOption { 19 description = "Docker registry host or ip to bind to."; 20 default = "127.0.0.1"; 21 type = types.str; ··· 50 after = [ "network.target" ]; 51 52 environment = { 53 + REGISTRY_HOST = cfg.listenAddress; 54 REGISTRY_PORT = toString cfg.port; 55 GUNICORN_OPTS = "[--preload]"; # see https://github.com/docker/docker-registry#sqlalchemy 56 STORAGE_PATH = cfg.storagePath; ··· 65 }; 66 67 postStart = '' 68 + until ${pkgs.curl}/bin/curl -s -o /dev/null 'http://${cfg.listenAddress}:${toString cfg.port}/'; do 69 sleep 1; 70 done 71 '';
+2 -2
nixos/modules/services/misc/subsonic.nix
··· 21 ''; 22 }; 23 24 - host = mkOption { 25 type = types.string; 26 default = "0.0.0.0"; 27 description = '' ··· 115 ExecStart = '' 116 ${pkgs.jre}/bin/java -Xmx${toString cfg.maxMemory}m \ 117 -Dsubsonic.home=${cfg.home} \ 118 - -Dsubsonic.host=${cfg.host} \ 119 -Dsubsonic.port=${toString cfg.port} \ 120 -Dsubsonic.httpsPort=${toString cfg.httpsPort} \ 121 -Dsubsonic.contextPath=${cfg.contextPath} \
··· 21 ''; 22 }; 23 24 + listenAddress = mkOption { 25 type = types.string; 26 default = "0.0.0.0"; 27 description = '' ··· 115 ExecStart = '' 116 ${pkgs.jre}/bin/java -Xmx${toString cfg.maxMemory}m \ 117 -Dsubsonic.home=${cfg.home} \ 118 + -Dsubsonic.host=${cfg.listenAddress} \ 119 -Dsubsonic.port=${toString cfg.port} \ 120 -Dsubsonic.httpsPort=${toString cfg.httpsPort} \ 121 -Dsubsonic.contextPath=${cfg.contextPath} \
+3 -3
nixos/modules/services/monitoring/cadvisor.nix
··· 14 description = "Whether to enable cadvisor service."; 15 }; 16 17 - host = mkOption { 18 default = "127.0.0.1"; 19 type = types.str; 20 description = "Cadvisor listening host"; ··· 71 after = [ "network.target" "docker.service" "influxdb.service" ]; 72 73 postStart = mkBefore '' 74 - until ${pkgs.curl}/bin/curl -s -o /dev/null 'http://${cfg.host}:${toString cfg.port}/containers/'; do 75 sleep 1; 76 done 77 ''; ··· 79 serviceConfig = { 80 ExecStart = ''${pkgs.cadvisor}/bin/cadvisor \ 81 -logtostderr=true \ 82 - -listen_ip=${cfg.host} \ 83 -port=${toString cfg.port} \ 84 ${optionalString (cfg.storageDriver != null) '' 85 -storage_driver ${cfg.storageDriver} \
··· 14 description = "Whether to enable cadvisor service."; 15 }; 16 17 + listenAddress = mkOption { 18 default = "127.0.0.1"; 19 type = types.str; 20 description = "Cadvisor listening host"; ··· 71 after = [ "network.target" "docker.service" "influxdb.service" ]; 72 73 postStart = mkBefore '' 74 + until ${pkgs.curl}/bin/curl -s -o /dev/null 'http://${cfg.listenAddress}:${toString cfg.port}/containers/'; do 75 sleep 1; 76 done 77 ''; ··· 79 serviceConfig = { 80 ExecStart = ''${pkgs.cadvisor}/bin/cadvisor \ 81 -logtostderr=true \ 82 + -listen_ip=${cfg.listenAddress} \ 83 -port=${toString cfg.port} \ 84 ${optionalString (cfg.storageDriver != null) '' 85 -storage_driver ${cfg.storageDriver} \
+6 -6
nixos/modules/services/monitoring/graphite.nix
··· 77 type = types.bool; 78 }; 79 80 - host = mkOption { 81 description = "Graphite web frontend listen address."; 82 default = "127.0.0.1"; 83 type = types.str; ··· 121 type = types.listOf types.str; 122 }; 123 124 - host = mkOption { 125 description = "Graphite web service listen address."; 126 default = "127.0.0.1"; 127 type = types.str; ··· 292 }; 293 294 graphiteUrl = mkOption { 295 - default = "http://${cfg.web.host}:${toString cfg.web.port}"; 296 description = "Host where graphite service runs."; 297 type = types.str; 298 }; ··· 337 338 graphiteUrl = mkOption { 339 description = "URL to your graphite service."; 340 - default = "http://${cfg.web.host}:${toString cfg.web.port}"; 341 type = types.str; 342 }; 343 ··· 452 serviceConfig = { 453 ExecStart = '' 454 ${pkgs.python27Packages.waitress}/bin/waitress-serve \ 455 - --host=${cfg.web.host} --port=${toString cfg.web.port} \ 456 --call django.core.handlers.wsgi:WSGIHandler''; 457 User = "graphite"; 458 Group = "graphite"; ··· 494 serviceConfig = { 495 ExecStart = '' 496 ${pkgs.python27Packages.waitress}/bin/waitress-serve \ 497 - --host=${cfg.api.host} --port=${toString cfg.api.port} \ 498 graphite_api.app:app 499 ''; 500 User = "graphite";
··· 77 type = types.bool; 78 }; 79 80 + listenAddress = mkOption { 81 description = "Graphite web frontend listen address."; 82 default = "127.0.0.1"; 83 type = types.str; ··· 121 type = types.listOf types.str; 122 }; 123 124 + listenAddress = mkOption { 125 description = "Graphite web service listen address."; 126 default = "127.0.0.1"; 127 type = types.str; ··· 292 }; 293 294 graphiteUrl = mkOption { 295 + default = "http://${cfg.web.listenAddress}:${toString cfg.web.port}"; 296 description = "Host where graphite service runs."; 297 type = types.str; 298 }; ··· 337 338 graphiteUrl = mkOption { 339 description = "URL to your graphite service."; 340 + default = "http://${cfg.web.listenAddress}:${toString cfg.web.port}"; 341 type = types.str; 342 }; 343 ··· 452 serviceConfig = { 453 ExecStart = '' 454 ${pkgs.python27Packages.waitress}/bin/waitress-serve \ 455 + --host=${cfg.web.listenAddress} --port=${toString cfg.web.port} \ 456 --call django.core.handlers.wsgi:WSGIHandler''; 457 User = "graphite"; 458 Group = "graphite"; ··· 494 serviceConfig = { 495 ExecStart = '' 496 ${pkgs.python27Packages.waitress}/bin/waitress-serve \ 497 + --host=${cfg.api.listenAddress} --port=${toString cfg.api.port} \ 498 graphite_api.app:app 499 ''; 500 User = "graphite";
+2 -2
nixos/modules/services/monitoring/statsd.nix
··· 11 12 configFile = pkgs.writeText "statsd.conf" '' 13 { 14 - address: "${cfg.host}", 15 port: "${toString cfg.port}", 16 mgmt_address: "${cfg.mgmt_address}", 17 mgmt_port: "${toString cfg.mgmt_port}", ··· 48 type = types.bool; 49 }; 50 51 - host = mkOption { 52 description = "Address that statsd listens on over UDP"; 53 default = "127.0.0.1"; 54 type = types.str;
··· 11 12 configFile = pkgs.writeText "statsd.conf" '' 13 { 14 + address: "${cfg.listenAddress}", 15 port: "${toString cfg.port}", 16 mgmt_address: "${cfg.mgmt_address}", 17 mgmt_port: "${toString cfg.mgmt_port}", ··· 48 type = types.bool; 49 }; 50 51 + listenAddress = mkOption { 52 description = "Address that statsd listens on over UDP"; 53 default = "127.0.0.1"; 54 type = types.str;
+2 -2
nixos/modules/services/networking/shout.nix
··· 19 ''; 20 }; 21 22 - host = mkOption { 23 type = types.string; 24 default = "0.0.0.0"; 25 description = "IP interface to listen on for http connections."; ··· 66 "${pkgs.shout}/bin/shout" 67 (if cfg.private then "--private" else "--public") 68 "--port" (toString cfg.port) 69 - "--host" (toString cfg.host) 70 "--home" shoutHome 71 ]; 72 serviceConfig = {
··· 19 ''; 20 }; 21 22 + listenAddress = mkOption { 23 type = types.string; 24 default = "0.0.0.0"; 25 description = "IP interface to listen on for http connections."; ··· 66 "${pkgs.shout}/bin/shout" 67 (if cfg.private then "--private" else "--public") 68 "--port" (toString cfg.port) 69 + "--host" (toString cfg.listenAddress) 70 "--home" shoutHome 71 ]; 72 serviceConfig = {
+2 -2
nixos/modules/services/networking/sslh.nix
··· 16 17 listen: 18 ( 19 - { host: "${cfg.host}"; port: "${toString cfg.port}"; } 20 ); 21 22 ${cfg.appendConfig} ··· 56 description = "PID file path for sslh daemon."; 57 }; 58 59 - host = mkOption { 60 type = types.str; 61 default = config.networking.hostName; 62 description = "Listening hostname.";
··· 16 17 listen: 18 ( 19 + { host: "${cfg.listenAddress}"; port: "${toString cfg.port}"; } 20 ); 21 22 ${cfg.appendConfig} ··· 56 description = "PID file path for sslh daemon."; 57 }; 58 59 + listenAddress = mkOption { 60 type = types.str; 61 default = config.networking.hostName; 62 description = "Listening hostname.";
+3 -3
nixos/modules/services/search/elasticsearch.nix
··· 6 cfg = config.services.elasticsearch; 7 8 esConfig = '' 9 - network.host: ${cfg.host} 10 network.port: ${toString cfg.port} 11 network.tcp.port: ${toString cfg.tcp_port} 12 cluster.name: ${cfg.cluster_name} ··· 43 type = types.package; 44 }; 45 46 - host = mkOption { 47 description = "Elasticsearch listen address."; 48 default = "127.0.0.1"; 49 type = types.str; ··· 142 ln -s ${esPlugins}/plugins ${cfg.dataDir}/plugins 143 ''; 144 postStart = mkBefore '' 145 - until ${pkgs.curl}/bin/curl -s -o /dev/null ${cfg.host}:${toString cfg.port}; do 146 sleep 1 147 done 148 '';
··· 6 cfg = config.services.elasticsearch; 7 8 esConfig = '' 9 + network.host: ${cfg.listenAddress} 10 network.port: ${toString cfg.port} 11 network.tcp.port: ${toString cfg.tcp_port} 12 cluster.name: ${cfg.cluster_name} ··· 43 type = types.package; 44 }; 45 46 + listenAddress = mkOption { 47 description = "Elasticsearch listen address."; 48 default = "127.0.0.1"; 49 type = types.str; ··· 142 ln -s ${esPlugins}/plugins ${cfg.dataDir}/plugins 143 ''; 144 postStart = mkBefore '' 145 + until ${pkgs.curl}/bin/curl -s -o /dev/null ${cfg.listenAddress}:${toString cfg.port}; do 146 sleep 1 147 done 148 '';
+2 -2
nixos/modules/services/search/kibana.nix
··· 8 cfgFile = pkgs.writeText "kibana.json" (builtins.toJSON ( 9 (filterAttrsRecursive (n: v: v != null) ({ 10 server = { 11 - host = cfg.host; 12 port = cfg.port; 13 ssl = { 14 cert = cfg.cert; ··· 44 options.services.kibana = { 45 enable = mkEnableOption "enable kibana service"; 46 47 - host = mkOption { 48 description = "Kibana listening host"; 49 default = "127.0.0.1"; 50 type = types.str;
··· 8 cfgFile = pkgs.writeText "kibana.json" (builtins.toJSON ( 9 (filterAttrsRecursive (n: v: v != null) ({ 10 server = { 11 + host = cfg.listenAddress; 12 port = cfg.port; 13 ssl = { 14 cert = cfg.cert; ··· 44 options.services.kibana = { 45 enable = mkEnableOption "enable kibana service"; 46 47 + listenAddress = mkOption { 48 description = "Kibana listening host"; 49 default = "127.0.0.1"; 50 type = types.str;