aboutsummaryrefslogtreecommitdiff
path: root/nixos/machine/errol.nix
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2023-03-03 20:36:00 +0100
committerKarel Kočí <cynerd@email.cz>2023-03-03 20:36:00 +0100
commitbe12face6349f883eb684906df624956c462342a (patch)
tree10adaf86e58b0f04918dfb581e6239b543e95b68 /nixos/machine/errol.nix
parentfe9594d471fd1ec9531d1adbbee4a407b76252b0 (diff)
downloadnixos-personal-be12face6349f883eb684906df624956c462342a.tar.gz
nixos-personal-be12face6349f883eb684906df624956c462342a.tar.bz2
nixos-personal-be12face6349f883eb684906df624956c462342a.zip
errol: add zigbee2mqtt
Diffstat (limited to 'nixos/machine/errol.nix')
-rw-r--r--nixos/machine/errol.nix28
1 files changed, 28 insertions, 0 deletions
diff --git a/nixos/machine/errol.nix b/nixos/machine/errol.nix
index 8609956..74901f9 100644
--- a/nixos/machine/errol.nix
+++ b/nixos/machine/errol.nix
@@ -86,6 +86,7 @@ with lib; {
};
met = {};
default_config = {};
+ automation = "!include automations.yaml";
};
extraComponents = [];
package = pkgs.home-assistant.override {
@@ -95,5 +96,32 @@ with lib; {
];
};
};
+
+ services.zigbee2mqtt = {
+ enable = true;
+ settings = {
+ serial.port = "/dev/serial/by-id/usb-ITEAD_SONOFF_Zigbee_3.0_USB_Dongle_Plus_V2_20220812153849-if00";
+ mqtt = {
+ server = "mqtt://${config.cynerd.hosts.spt.mox}:1883";
+ user = "zigbee2mqtt";
+ password = "!secret.yaml mqtt_password";
+ };
+ advanced = {
+ network_key = "!secret.yaml network_key";
+ homeassistant_legacy_entity_attributes = false;
+ legacy_api = false;
+ legacy_availability_payload = false;
+ last_seen = "epoch";
+ };
+ frontend = true;
+ availability = true;
+ homeassistant = {
+ legacy_triggers = false;
+ };
+ device_options.legacy = false;
+ permit_join = false;
+ devices = config.secrets.zigbee2mqttDevices;
+ };
+ };
};
}