feat(tyr): setup home assistant.

This commit is contained in:
CronyAkatsuki 2025-10-11 22:20:57 +02:00
parent 082c6a7e3a
commit d8fcc8c353
4 changed files with 40 additions and 0 deletions

View file

@ -286,6 +286,7 @@
./modules/linux/nixos ./modules/linux/nixos
./modules/servers/tyr ./modules/servers/tyr
./modules/servers/general/restic.nix ./modules/servers/general/restic.nix
./modules/servers/general/podman.nix
home-manager.nixosModules.home-manager home-manager.nixosModules.home-manager
{ {
home-manager.useGlobalPkgs = true; home-manager.useGlobalPkgs = true;

View file

@ -8,5 +8,6 @@
./nfs-server.nix ./nfs-server.nix
./dns.nix ./dns.nix
./traefik.nix ./traefik.nix
./home-assistant.nix
]; ];
} }

View file

@ -71,6 +71,7 @@
''"glance.home.cronyakatsuki.xyz IN A 192.168.0.5"'' ''"glance.home.cronyakatsuki.xyz IN A 192.168.0.5"''
''"syncthing.home.cronyakatsuki.xyz IN A 192.168.0.5"'' ''"syncthing.home.cronyakatsuki.xyz IN A 192.168.0.5"''
''"wallos.home.cronyakatsuki.xyz IN A 192.168.0.5"'' ''"wallos.home.cronyakatsuki.xyz IN A 192.168.0.5"''
''"assistant.home.cronyakatsuki.xyz IN A 192.168.0.5"''
]; ];
}; };
}; };

View file

@ -0,0 +1,37 @@
{
virtualisation.oci-containers.containers.homeassistant = {
image = "homeassistant/home-assistant:stable";
autoStart = true;
ports = [
"8123:8123"
];
volumes = [
"/var/lib/homeassistant:/config"
];
environment = {
TZ = "Europe/Berlin";
};
};
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";
};
};
}