nixos-servers/services/home-assistant/default.nix
Torjus Håkestad 822c22cde6
Some checks failed
Run nix flake check / flake-check (push) Failing after 4m54s
Periodic flake update / flake-update (push) Successful in 1m23s
Add script to rebuild all hosts
2025-01-21 00:05:40 +01:00

66 lines
1.4 KiB
Nix

{ pkgs, config, ... }:
{
# Enable the Home Assistant service
services.home-assistant = {
enable = true;
package = pkgs.unstable.home-assistant;
configWritable = true;
config = null;
extraPackages =
python3Packages: with pkgs.unstable.python313Packages; [
aiopyarr
bellows
gtts
isal
paho-mqtt
pykodi
python-roborock
radios
uiprotect
unifi-discovery
universal-silabs-flasher
vacuum-map-parser-base
vacuum-map-parser-roborock
zha
zha-quirks
zigpy-cc
zigpy-deconz
zigpy-xbee
zigpy-zigate
zigpy-znp
zlib-ng
];
customComponents = with pkgs.home-assistant-custom-components; [
];
};
# Enable the mosquitto MQTT broker
services.mosquitto = {
enable = true;
persistence = true;
listeners = [
{
acl = [ "pattern readwrite #" ];
omitPasswordAuth = true;
settings.allow_anonymous = true;
}
];
};
# Enable the zigbee2mqtt service
services.zigbee2mqtt = {
enable = true;
package = pkgs.unstable.zigbee2mqtt;
settings = {
homeassistant = {
legacy_entity_attributes = false;
legacy_triggers = false;
};
availability = true;
frontend = true;
permit_join = false;
serial.port = "/dev/ttyUSB0";
};
};
}