2024-07-30 15:06:34 +01:00
|
|
|
{ config, ... }:
|
|
|
|
{
|
2024-07-21 18:40:13 +01:00
|
|
|
virtualisation.oci-containers = {
|
|
|
|
backend = "podman";
|
|
|
|
containers.homeassistant = {
|
2024-07-30 15:06:34 +01:00
|
|
|
volumes = [
|
2024-12-08 06:16:53 +00:00
|
|
|
"/var/lib/home-assistant:/config"
|
2024-07-30 15:06:34 +01:00
|
|
|
"/run/dbus:/run/dbus:ro"
|
2024-12-01 13:33:49 +00:00
|
|
|
"/var/lib/syncthing/Music:/music"
|
2024-07-30 15:06:34 +01:00
|
|
|
];
|
2024-07-21 18:40:13 +01:00
|
|
|
environment.TZ = config.time.timeZone;
|
2024-12-08 09:22:50 +00:00
|
|
|
image = "ghcr.io/home-assistant/home-assistant:2024.12";
|
2024-07-30 15:06:34 +01:00
|
|
|
extraOptions = [ "--network=host" ];
|
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";
|
|
|
|
}
|