feat(tyr): setup home assistant.
This commit is contained in:
parent
082c6a7e3a
commit
d8fcc8c353
4 changed files with 40 additions and 0 deletions
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