From e84e6dcf117080eaf7658b25fb20a9dc3b5d1cfe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sun, 24 Mar 2024 19:05:39 +0100 Subject: Add wireguard and more updates --- nixos/modules/home-assistant.nix | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) (limited to 'nixos/modules/home-assistant.nix') diff --git a/nixos/modules/home-assistant.nix b/nixos/modules/home-assistant.nix index 267f725..769b1c7 100644 --- a/nixos/modules/home-assistant.nix +++ b/nixos/modules/home-assistant.nix @@ -5,13 +5,12 @@ ... }: let inherit (lib) mkIf mkEnableOption; - cnf = config.cynerd.home-assistant; in { options = { cynerd.home-assistant = mkEnableOption "Enable Home Assistant and Bigclown"; }; - config = mkIf cnf { + config = mkIf config.cynerd.home-assistant { services.mosquitto = { enable = true; listeners = [ @@ -52,16 +51,13 @@ in { 1883 # Mosquitto ]; - services.bigclown = { - gateway = { - enable = true; - device = "/dev/ttyUSB0"; - environmentFile = "/run/secrets/bigclown.env"; - baseTopicPrefix = "bigclown/"; - mqtt = { - username = "bigclown"; - password = "@PASS_MQTT@"; - }; + services.bcg = { + enable = true; + device = "/dev/ttyUSB0"; + baseTopicPrefix = "bigclown/"; + mqtt = { + username = "bigclown"; + keyfile = "/run/secrets/mqtt-bigclown.pass"; }; }; -- cgit v1.2.3