Start converting home-assistant from container to native install

This commit is contained in:
Evie Litherland-Smith 2025-02-16 10:31:55 +00:00
parent 64372f0f6b
commit 45e12d2906

View file

@ -1,17 +1,48 @@
{ config, ... }: { config, pkgs, ... }:
{ {
virtualisation.oci-containers = { services.home-assistant = {
backend = "podman"; enable = true;
containers.homeassistant = { extraComponents = [
volumes = [ # Components required to complete the onboarding
"/var/lib/home-assistant:/config" "analytics"
"/run/dbus:/run/dbus:ro" "google_translate"
"/var/lib/syncthing/Music:/music" "met"
"/tmp:/.dockerenv" # TEMP FIX FOR CONTAINER CHECKS "radio_browser"
]; "shopping_list"
environment.TZ = config.time.timeZone; # Recommended for fast zlib compression
image = "ghcr.io/home-assistant/home-assistant@sha256:db0f344d5126bfedd7bf18e0bfb8249a9a5e6785e2f6cb3728edbd393fff1981"; # 2024-12-20T10:54:13.805911135Z # https://www.home-assistant.io/integrations/isal
extraOptions = [ "--network=host" ]; "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";
};
}; };
}; };
networking.firewall = { networking.firewall = {