mirror of
https://github.com/gensokyo-zone/infrastructure.git
synced 2026-02-09 12:29:19 -08:00
refactor: static z2m device name
This commit is contained in:
parent
5c93db721a
commit
f1b19ffb1b
1 changed files with 6 additions and 2 deletions
|
|
@ -4,7 +4,7 @@
|
|||
...
|
||||
}: let
|
||||
cfg = config.services.zigbee2mqtt;
|
||||
inherit (lib) mkDefault;
|
||||
inherit (lib) mkIf mkDefault;
|
||||
in {
|
||||
sops.secrets.z2m-secret = {
|
||||
owner = "zigbee2mqtt";
|
||||
|
|
@ -31,7 +31,7 @@ in {
|
|||
port = 8072;
|
||||
};
|
||||
serial = {
|
||||
port = "/dev/ttyUSB0";
|
||||
port = "/dev/ttyZigbee";
|
||||
};
|
||||
availability = {
|
||||
# minutes
|
||||
|
|
@ -40,4 +40,8 @@ in {
|
|||
};
|
||||
};
|
||||
};
|
||||
|
||||
services.udev.extraRules = mkIf cfg.enable ''
|
||||
SUBSYSTEM=="tty", ATTRS{interface}=="Sonoff Zigbee 3.0 USB Dongle Plus", OWNER="zigbee2mqtt", SYMLINK+="ttyZigbee"
|
||||
'';
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue