nix-conf/modules/servers/tyr/services/home-assistant.nix
Crony Akatsuki 4e783c052b refactor: reorganize server modules
- Moved each individual service definition into a dedicated `services/`
  directory under every server module (e.g.
`modules/servers/bragi/services/`).
- Updated the corresponding `default.nix` files to import the renamed
  service modules from the new location.
- Applied the same changes across all server modules, ensuring
  the API and import paths remain consistent.
2026-01-19 19:21:11 +01:00

48 lines
1.1 KiB
Nix

{
virtualisation.oci-containers.containers.homeassistant = {
image = "docker.io/homeassistant/home-assistant:stable";
autoStart = true;
ports = [
"8123:8123"
];
devices = [
"/dev/ttyUSB0:/dev/ttyUSB0"
];
privileged = true;
capabilities = {
NET_ADMIN = true;
NET_RAW = true;
};
labels = {
"io.containers.autoupdate" = "registry";
};
extraOptions = ["--network=host"];
volumes = [
"/etc/localtime:/etc/localtime:ro"
"/var/lib/homeassistant:/config"
"/run/dbus:/run/dbus:ro"
];
};
services.restic.backups = {
local.paths = ["/var/lib/homeassistant"];
server.paths = ["/var/lib/homeassistant"];
};
services.traefik.dynamicConfigOptions.http = {
services.assistant.loadBalancer.servers = [
{
url = "http://localhost:8123";
}
];
routers.assistant = {
rule = "Host(`assistant.home.cronyakatsuki.xyz`)";
tls = {
certResolver = "porkbun";
};
service = "assistant";
entrypoints = "websecure";
};
};
}