feat(tyr): setup home assistant.
This commit is contained in:
parent
082c6a7e3a
commit
d8fcc8c353
4 changed files with 40 additions and 0 deletions
|
|
@ -8,5 +8,6 @@
|
|||
./nfs-server.nix
|
||||
./dns.nix
|
||||
./traefik.nix
|
||||
./home-assistant.nix
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@
|
|||
''"glance.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"''
|
||||
''"assistant.home.cronyakatsuki.xyz IN A 192.168.0.5"''
|
||||
];
|
||||
};
|
||||
};
|
||||
|
|
|
|||
37
modules/servers/tyr/home-assistant.nix
Normal file
37
modules/servers/tyr/home-assistant.nix
Normal 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";
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue