diff options
author | Peter Simons <simons@cryp.to> | 2016-01-05 12:54:15 +0100 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2016-01-05 12:54:15 +0100 |
commit | d807b057eddc45093566b0b515b03a4217c165fa (patch) | |
tree | 9c0e6865e8061d2c34faca45d85e904fbb2984ae /nixos | |
parent | f4b2c3d51001aeef107bf33ba065d322e2c243c5 (diff) | |
parent | c7c3c95d92832b5a13524897e7b5583c98201a1e (diff) | |
download | nixlib-d807b057eddc45093566b0b515b03a4217c165fa.tar nixlib-d807b057eddc45093566b0b515b03a4217c165fa.tar.gz nixlib-d807b057eddc45093566b0b515b03a4217c165fa.tar.bz2 nixlib-d807b057eddc45093566b0b515b03a4217c165fa.tar.lz nixlib-d807b057eddc45093566b0b515b03a4217c165fa.tar.xz nixlib-d807b057eddc45093566b0b515b03a4217c165fa.tar.zst nixlib-d807b057eddc45093566b0b515b03a4217c165fa.zip |
Merge pull request #11920 from bjornfor/rename-host-to-listen-address
Rename NixOS option names: 'host' to 'listenAddress'
Diffstat (limited to 'nixos')
-rw-r--r-- | nixos/modules/rename.nix | 13 | ||||
-rw-r--r-- | nixos/modules/services/audio/mpd.nix | 4 | ||||
-rw-r--r-- | nixos/modules/services/databases/neo4j.nix | 4 | ||||
-rw-r--r-- | nixos/modules/services/misc/docker-registry.nix | 6 | ||||
-rw-r--r-- | nixos/modules/services/misc/subsonic.nix | 4 | ||||
-rw-r--r-- | nixos/modules/services/monitoring/cadvisor.nix | 6 | ||||
-rw-r--r-- | nixos/modules/services/monitoring/graphite.nix | 12 | ||||
-rw-r--r-- | nixos/modules/services/monitoring/statsd.nix | 4 | ||||
-rw-r--r-- | nixos/modules/services/networking/shout.nix | 4 | ||||
-rw-r--r-- | nixos/modules/services/networking/sslh.nix | 4 | ||||
-rw-r--r-- | nixos/modules/services/search/elasticsearch.nix | 6 | ||||
-rw-r--r-- | nixos/modules/services/search/kibana.nix | 4 |
12 files changed, 42 insertions, 29 deletions
diff --git a/nixos/modules/rename.nix b/nixos/modules/rename.nix index 2a3d89e9f6f2..491e6fa7d0cd 100644 --- a/nixos/modules/rename.nix +++ b/nixos/modules/rename.nix @@ -14,6 +14,19 @@ 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" "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" ]) diff --git a/nixos/modules/services/audio/mpd.nix b/nixos/modules/services/audio/mpd.nix index 5515f827b290..5d5fef667941 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 diff --git a/nixos/modules/services/databases/neo4j.nix b/nixos/modules/services/databases/neo4j.nix index 3cf22db7da2b..1413839ce220 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; diff --git a/nixos/modules/services/misc/docker-registry.nix b/nixos/modules/services/misc/docker-registry.nix index f472e530a70b..0a0e160a7cc3 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 ''; diff --git a/nixos/modules/services/misc/subsonic.nix b/nixos/modules/services/misc/subsonic.nix index 4d164ad8d65f..2831e95b9480 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} \ diff --git a/nixos/modules/services/monitoring/cadvisor.nix b/nixos/modules/services/monitoring/cadvisor.nix index b6cf397f35c0..425e0ee9230f 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} \ diff --git a/nixos/modules/services/monitoring/graphite.nix b/nixos/modules/services/monitoring/graphite.nix index ce8e572cc999..731e5fae9e9d 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"; diff --git a/nixos/modules/services/monitoring/statsd.nix b/nixos/modules/services/monitoring/statsd.nix index 39fabc27d6c8..df2adb9f2766 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; diff --git a/nixos/modules/services/networking/shout.nix b/nixos/modules/services/networking/shout.nix index fe3cba8f1492..f069fe7bec96 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 = { diff --git a/nixos/modules/services/networking/sslh.nix b/nixos/modules/services/networking/sslh.nix index c87fe914df8b..bd584a3a85d3 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."; diff --git a/nixos/modules/services/search/elasticsearch.nix b/nixos/modules/services/search/elasticsearch.nix index 3436bd01d848..b3f0a5251d71 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 ''; diff --git a/nixos/modules/services/search/kibana.nix b/nixos/modules/services/search/kibana.nix index f47ab8f55861..f9071ef66e72 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; |