- Added `homeassistant.nix` to the list of services in `default.nix` - Configured Home Assistant with basic settings and extra components - Set up vhost for Home Assistant with specified domain and network interfaces - Included necessary Python packages for Home Assistant components
61 lines
1.2 KiB
Nix
61 lines
1.2 KiB
Nix
{ config, pkgs, ... }:
|
|
|
|
let
|
|
domain = "home.giugl.io";
|
|
in
|
|
{
|
|
services.home-assistant = {
|
|
enable = true;
|
|
config = {
|
|
http = {
|
|
server_host = "127.0.0.1";
|
|
server_port = 8123;
|
|
use_x_forwarded_for = true;
|
|
trusted_proxies = [ "127.0.0.1" ];
|
|
};
|
|
homeassistant = {
|
|
name = "Underwood House";
|
|
unit_system = "metric";
|
|
};
|
|
default_config = { };
|
|
};
|
|
extraComponents = [
|
|
"otbr"
|
|
"litterrobot"
|
|
"apple_tv"
|
|
"homekit"
|
|
"homekit_controller"
|
|
"spotify"
|
|
"hue"
|
|
"sonos"
|
|
"tplink"
|
|
"ollama"
|
|
"wyoming"
|
|
"whisper"
|
|
"piper"
|
|
"isal"
|
|
"radarr"
|
|
"sonarr"
|
|
];
|
|
extraPackages = python3Packages: with python3Packages; [
|
|
pkgs.openai-whisper
|
|
openai-whisper
|
|
pkgs.piper-tts
|
|
pkgs.wyoming-piper
|
|
];
|
|
};
|
|
|
|
architect.vhost.${domain} = with config.architect.networks; {
|
|
dnsInterfaces = [ "tailscale" "lan" ];
|
|
|
|
locations."/" = {
|
|
port = config.services.home-assistant.config.http.server_port;
|
|
allowLan = true;
|
|
proxyWebsockets = true;
|
|
allow = [
|
|
tailscale.net
|
|
];
|
|
};
|
|
};
|
|
}
|