aboutsummaryrefslogtreecommitdiff
path: root/nixos/configurations/spt-omnia.nix
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2025-01-24 15:01:30 +0100
committerKarel Kočí <cynerd@email.cz>2025-01-24 15:01:30 +0100
commit2f532dc573e35128ea82315289a0714579c9142a (patch)
tree124ee6bcfce253ca04633af2ebe659016ee06500 /nixos/configurations/spt-omnia.nix
parent55be775b8478c78e3923fba46b6a49d86d81dfb2 (diff)
downloadnixos-personal-2f532dc573e35128ea82315289a0714579c9142a.tar.gz
nixos-personal-2f532dc573e35128ea82315289a0714579c9142a.tar.bz2
nixos-personal-2f532dc573e35128ea82315289a0714579c9142a.zip
nixos: refactor the home automationHEADmaster
This moves zigbee to spt-omnia.
Diffstat (limited to 'nixos/configurations/spt-omnia.nix')
-rw-r--r--nixos/configurations/spt-omnia.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/nixos/configurations/spt-omnia.nix b/nixos/configurations/spt-omnia.nix
index 23aa006..e5d2433 100644
--- a/nixos/configurations/spt-omnia.nix
+++ b/nixos/configurations/spt-omnia.nix
@@ -130,4 +130,34 @@ in {
tcp flags syn tcp option maxseg size set rt mtu comment "Needed for PPPoE to fix IPv4"
iifname {"home", "wg"} oifname {"home", "wg"} accept
'';
+
+ ##############################################################################
+ 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;
+ };
+ };
+ };
}