1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-10 23:00:39 +02:00

feat: add home assistant configuration

This commit is contained in:
oddlama 2023-03-12 01:08:17 +01:00
parent 8c343b8f0f
commit 28b7ef0d9a
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A
2 changed files with 47 additions and 20 deletions

View file

@ -15,6 +15,7 @@
./fs.nix
./net.nix
./home-assistant.nix
];
boot.loader.grub.enable = false;
@ -30,24 +31,4 @@
# Fails if there are not SMART devices
services.smartd.enable = lib.mkForce false;
services.home-assistant = {
enable = true;
extraComponents = ["default_config" "met"];
openFirewall = true;
config = {
default_config = {};
met = {};
};
};
#networking.firewall.allowedTCPPorts = [1883];
#services.zigbee2mqtt.enable = true;
#services.zigbee2mqtt.settings = {
# homeassistant = config.services.home-assistant.enable;
# permit_join = true;
# serial = {
# port = "/dev/serial/by-id/usb-Silicon_Labs_Sonoff_Zigbee_3.0_USB_Dongle_Plus_0001-if00-port0";
# };
#};
}

View file

@ -0,0 +1,46 @@
{
services.home-assistant = {
enable = true;
extraComponents = [
"default_config"
"radio_browser"
"met"
"esphome"
"fritzbox"
"spotify"
"mqtt"
];
openFirewall = true;
config = {
default_config = {};
met = {};
};
extraPackages = python3Packages:
with python3Packages; [
psycopg2
securetar
libsoundtouch
];
};
services.mosquitto = {
enable = true;
persistence = true;
listeners = [
{
acl = ["pattern readwrite #"];
omitPasswordAuth = true;
settings.allow_anonymous = true;
}
];
};
services.zigbee2mqtt = {
enable = true;
settings = {
homeassistant = true;
permit_join = true;
serial = {
port = "/dev/serial/by-id/usb-Silicon_Labs_Sonoff_Zigbee_3.0_USB_Dongle_Plus_0001-if00-port0";
};
};
};
}