77 lines
1.8 KiB
Nix
77 lines
1.8 KiB
Nix
|
{
|
||
|
self,
|
||
|
config,
|
||
|
pkgs,
|
||
|
...
|
||
|
}: {
|
||
|
config = {
|
||
|
services.mosquitto = {
|
||
|
enable = true;
|
||
|
listeners = [
|
||
|
{
|
||
|
users = {
|
||
|
z2m.hashedPassword = "$7$101$iZE7WOCQIaLtuoVN$M7AAB/mMmhkuXQVmu2RPoJzm744bmwxGTJwE0eoqlPAjyQHbjmOWfEuKoo9jnQCoQu2T96gS8znsUNizGgPWiQ==";
|
||
|
ha.hashedPassword = "$7$101$jLA9PReG5btNSvw8$O0c3UzCfcBcvqVH8kMZIwEims7p1L4o/DmOTHO9w9731ggC5SyUpJGQIDiUbv+IrTl/H0+Fz9QF/jvY0QCuxuA==";
|
||
|
};
|
||
|
}
|
||
|
];
|
||
|
};
|
||
|
|
||
|
services.udev.extraRules = ''KERNEL=="ttyS0", OWNER="zigbee2mqtt", GROUP="zigbee2mqtt"'';
|
||
|
|
||
|
services.zigbee2mqtt = {
|
||
|
enable = true;
|
||
|
settings = {
|
||
|
frontend = true;
|
||
|
permit_join = true;
|
||
|
homeassistant = true;
|
||
|
options = "-d -d";
|
||
|
mqtt = {
|
||
|
user = "z2m";
|
||
|
password = "!secrets.yaml mqtt_password";
|
||
|
};
|
||
|
serial = {
|
||
|
port = "/dev/ttyS0";
|
||
|
adapter = "deconz";
|
||
|
};
|
||
|
#advanced.network_key = "'!secrets.yaml network_key'";
|
||
|
};
|
||
|
};
|
||
|
|
||
|
#users.users.hass.extraGroups = [ "tty" ];
|
||
|
|
||
|
services.home-assistant = {
|
||
|
enable = true;
|
||
|
extraComponents = ["fritz" "fritzbox" "fritzbox_callmonitor" "met" "mqtt"];
|
||
|
config = {
|
||
|
homeassistant = {};
|
||
|
http = {
|
||
|
ip_ban_enabled = false;
|
||
|
use_x_forwarded_for = true;
|
||
|
trusted_proxies = [
|
||
|
"127.0.0.1"
|
||
|
"10.254.0.21"
|
||
|
"10.0.1.5"
|
||
|
"10.0.1.6"
|
||
|
"172.16.0.0/12"
|
||
|
];
|
||
|
};
|
||
|
|
||
|
energy = {};
|
||
|
frontend = {};
|
||
|
history = {};
|
||
|
map = {};
|
||
|
my = {};
|
||
|
mobile_app = {};
|
||
|
network = {};
|
||
|
notify = {};
|
||
|
person = {};
|
||
|
ssdp = {};
|
||
|
sun = {};
|
||
|
system_health = {};
|
||
|
zeroconf = {};
|
||
|
};
|
||
|
};
|
||
|
};
|
||
|
}
|