2023-06-13 23:07:02 +02:00
|
|
|
{ makeSystem
|
|
|
|
, nixpkgs
|
|
|
|
}:
|
|
|
|
makeSystem {
|
|
|
|
system = "x86_64-linux";
|
|
|
|
name = "nixng-zigbee2mqtt";
|
|
|
|
inherit nixpkgs;
|
|
|
|
config =
|
|
|
|
{ pkgs, ... }:
|
|
|
|
{
|
|
|
|
config = {
|
|
|
|
dumb-init = {
|
|
|
|
enable = true;
|
|
|
|
type.services = { };
|
|
|
|
};
|
|
|
|
|
|
|
|
init.services.zigbee2mqtt = {
|
|
|
|
shutdownOnExit = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
services.zigbee2mqtt = {
|
|
|
|
enable = true;
|
|
|
|
user = "root";
|
|
|
|
envsubst = true;
|
|
|
|
config = {
|
|
|
|
homeassistant = true;
|
2023-07-10 00:49:57 +02:00
|
|
|
permit_join = false;
|
2023-06-13 23:07:02 +02:00
|
|
|
mqtt = {
|
|
|
|
base_topic = "zigbee2mqtt";
|
|
|
|
server = "mqtt://127.0.0.1:1883";
|
|
|
|
user = "\${MQTT_USER}";
|
|
|
|
password = "\${MQTT_PASSWORD}";
|
|
|
|
};
|
|
|
|
|
|
|
|
frontend = {
|
|
|
|
port = 8456;
|
|
|
|
host = "0.0.0.0";
|
|
|
|
};
|
|
|
|
|
|
|
|
advanced.pan_id = 15408;
|
2023-09-02 21:35:33 +02:00
|
|
|
advanced.channel = 15;
|
2023-06-13 23:07:02 +02:00
|
|
|
|
|
|
|
serial.port = "/dev/ttyUSB0";
|
|
|
|
|
|
|
|
devices = "devices.yaml";
|
|
|
|
groups = "groups.yaml";
|
|
|
|
log_level = "debug";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
|