2025-02-16 10:31:55 +00:00
|
|
|
{ config, pkgs, ... }:
|
2024-07-30 15:06:34 +01:00
|
|
|
{
|
2025-02-16 10:31:55 +00:00
|
|
|
services.home-assistant = {
|
|
|
|
enable = true;
|
|
|
|
extraComponents = [
|
|
|
|
# Components required to complete the onboarding
|
|
|
|
"analytics"
|
|
|
|
"google_translate"
|
|
|
|
"met"
|
|
|
|
"radio_browser"
|
|
|
|
"shopping_list"
|
|
|
|
# Recommended for fast zlib compression
|
|
|
|
# https://www.home-assistant.io/integrations/isal
|
|
|
|
"isal"
|
|
|
|
# Extra integrations
|
|
|
|
"apple_tv"
|
|
|
|
"bluetooth"
|
|
|
|
"mobile_app"
|
|
|
|
"nanoleaf"
|
|
|
|
"proximity"
|
|
|
|
"prusalink"
|
|
|
|
"sonos"
|
|
|
|
"syncthing"
|
|
|
|
"tplink_tapo"
|
|
|
|
];
|
|
|
|
customComponents = with pkgs.home-assistant-custom-components; [ dirigera_platform ];
|
|
|
|
config = {
|
|
|
|
# Includes dependencies for a basic setup
|
|
|
|
# https://www.home-assistant.io/integrations/default_config/
|
|
|
|
default_config = { };
|
|
|
|
frontend.themes = "!include_dir_merge_named themes";
|
|
|
|
automation = "!include automations.yaml";
|
|
|
|
script = "!include scripts.yaml";
|
|
|
|
scene = "!include scenes.yaml";
|
|
|
|
http = {
|
|
|
|
use_x_forwarded_for = true;
|
|
|
|
trusted_proxies = [
|
|
|
|
"127.0.0.1"
|
|
|
|
"::1"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
homeassistant = {
|
|
|
|
inherit (config.location) latitude longitude;
|
|
|
|
media_dirs.music = "/var/lib/syncthing/Music";
|
|
|
|
};
|
2024-07-21 18:40:13 +01:00
|
|
|
};
|
|
|
|
};
|
2024-11-30 12:18:46 +00:00
|
|
|
networking.firewall = {
|
|
|
|
allowedTCPPorts = [
|
|
|
|
1400
|
|
|
|
1443
|
|
|
|
];
|
2024-12-08 09:26:40 +00:00
|
|
|
allowedUDPPorts = [
|
|
|
|
1400
|
|
|
|
1443
|
|
|
|
5353
|
|
|
|
];
|
2024-11-30 12:18:46 +00:00
|
|
|
};
|
2024-07-21 18:40:13 +01:00
|
|
|
services.caddy.virtualHosts."home.xenia.me.uk".extraConfig = "reverse_proxy http://localhost:8123";
|
|
|
|
}
|