nixos/system/services/home-assistant/default.nix

66 lines
1.6 KiB
Nix
Raw Normal View History

{ config, pkgs, ... }:
2024-07-30 15:06:34 +01: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"
"tado"
"tplink_tapo"
];
customComponents = with pkgs.home-assistant-custom-components; [
(dirigera_platform.override {
dirigera = (pkgs.python312Packages.dirigera.overrideAttrs (final: prev: { doCheck = false; }));
})
];
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";
};
};
};
networking.firewall = {
allowedTCPPorts = [
1400
1443
];
2024-12-08 09:26:40 +00:00
allowedUDPPorts = [
1400
1443
5353
];
};
services.caddy.virtualHosts."home.xenia.me.uk".extraConfig = "reverse_proxy http://localhost:8123";
}