summaryrefslogtreecommitdiff
path: root/nixos/modules/services/catbus-observer-networkpresence.nix
diff options
context:
space:
mode:
authorEthel Morgan <eth@ethulhu.co.uk>2020-06-29 23:13:58 +0100
committerEthel Morgan <eth@ethulhu.co.uk>2020-06-29 23:13:58 +0100
commitea0e976056ee1b1652a51dc1ae3b02debf80e74d (patch)
tree07b7b30a383d5dd215ee61492dec79b8b73131ab /nixos/modules/services/catbus-observer-networkpresence.nix
parent3683f93300c28011c81a5849132a54774d69ad2f (diff)
catbus mqttBroker parameters are URLs
Diffstat (limited to '')
-rw-r--r--nixos/modules/services/catbus-observer-networkpresence.nix17
1 files changed, 5 insertions, 12 deletions
diff --git a/nixos/modules/services/catbus-observer-networkpresence.nix b/nixos/modules/services/catbus-observer-networkpresence.nix
index 528ab66..da54956 100644
--- a/nixos/modules/services/catbus-observer-networkpresence.nix
+++ b/nixos/modules/services/catbus-observer-networkpresence.nix
@@ -6,7 +6,7 @@ let
cfg = config.eth.services.catbus-observer-networkpresence;
configJSON = pkgs.writeText "config.json" (builtins.toJSON {
- mqttBroker = "tcp://${cfg.mqttBroker.host}:${toString cfg.mqttBroker.port}";
+ mqttBroker = cfg.mqttBroker;
devices = cfg.devices;
});
@@ -23,17 +23,10 @@ in {
example = "enp2s0";
};
- mqttBroker = {
- host = mkOption {
- type = types.str;
- description = "Host of the MQTT broker.";
- example = "localhost";
- };
- port = mkOption {
- type = types.int;
- description = "Port of the MQTT broker.";
- default = 1883;
- };
+ mqttBroker = mkOption {
+ type = types.str;
+ description = "URL of the MQTT broker.";
+ example = "tcp://broker.local:1883";
};
devices = mkOption {