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"
|
2025-02-16 12:45:05 +00:00
|
|
|
"ffmpeg" # Tapo
|
2025-02-16 10:31:55 +00:00
|
|
|
"mobile_app"
|
|
|
|
"nanoleaf"
|
2025-02-16 12:45:05 +00:00
|
|
|
"onvif" # Tapo
|
2025-02-16 10:31:55 +00:00
|
|
|
"proximity"
|
|
|
|
"prusalink"
|
|
|
|
"sonos"
|
|
|
|
"syncthing"
|
2025-02-16 11:49:38 +00:00
|
|
|
"tado"
|
2025-02-16 10:31:55 +00:00
|
|
|
"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 { })
|
|
|
|
]);
|
2025-02-16 10:31:55 +00:00
|
|
|
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"
|
|
|
|
];
|
|
|
|
};
|
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";
|
|
|
|
}
|