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