mirror of
https://git.sr.ht/~magic_rb/dotfiles
synced 2024-11-29 03:26:13 +01:00
47ad385ca2
Signed-off-by: Magic_RB <magic_rb@redalder.org>
54 lines
1.1 KiB
Nix
54 lines
1.1 KiB
Nix
{ 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;
|
|
permit_join = true;
|
|
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;
|
|
|
|
serial.port = "/dev/ttyUSB0";
|
|
|
|
devices = "devices.yaml";
|
|
groups = "groups.yaml";
|
|
log_level = "debug";
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|
|
|
|
|