mirror of
https://github.com/oddlama/nix-config.git
synced 2025-10-11 07:10:39 +02:00
feat: add home assistant configuration
This commit is contained in:
parent
8c343b8f0f
commit
28b7ef0d9a
2 changed files with 47 additions and 20 deletions
|
@ -15,6 +15,7 @@
|
||||||
|
|
||||||
./fs.nix
|
./fs.nix
|
||||||
./net.nix
|
./net.nix
|
||||||
|
./home-assistant.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.loader.grub.enable = false;
|
boot.loader.grub.enable = false;
|
||||||
|
@ -30,24 +31,4 @@
|
||||||
|
|
||||||
# Fails if there are not SMART devices
|
# Fails if there are not SMART devices
|
||||||
services.smartd.enable = lib.mkForce false;
|
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";
|
|
||||||
# };
|
|
||||||
#};
|
|
||||||
}
|
}
|
||||||
|
|
46
hosts/zackbiene/home-assistant.nix
Normal file
46
hosts/zackbiene/home-assistant.nix
Normal 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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue