feat(architect): add Home Assistant configuration
- 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
This commit is contained in:
parent
29c2526e6a
commit
203a4edcd6
@ -40,6 +40,7 @@ in
|
||||
./teslamate.nix
|
||||
./postgres.nix
|
||||
./netdata.nix
|
||||
./homeassistant.nix
|
||||
];
|
||||
|
||||
age.identityPaths = [ "/root/.ssh/id_ed25519" ];
|
||||
|
60
hosts/architect/homeassistant.nix
Normal file
60
hosts/architect/homeassistant.nix
Normal file
@ -0,0 +1,60 @@
|
||||
{ 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
|
||||
];
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user