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

68 lines
1.7 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"
2025-02-16 12:45:05 +00:00
"ffmpeg" # Tapo
"mobile_app"
"nanoleaf"
2025-02-16 12:45:05 +00:00
"onvif" # Tapo
"proximity"
"prusalink"
"sonos"
"syncthing"
"tado"
"tplink_tapo"
];
2025-02-16 12:45:05 +00:00
customComponents =
(with pkgs.home-assistant-custom-components; [
(dirigera_platform.override {
dirigera = (pkgs.python312Packages.dirigera.overrideAttrs (final: prev: { doCheck = false; }));
})
])
++ (with pkgs; [
(home-assistant.python.pkgs.callPackage ./customComponents/tapo_control.nix { })
]);
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"
];
};
};
};
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";
}