feat(tyr): setup home assistant.
This commit is contained in:
parent
082c6a7e3a
commit
d8fcc8c353
4 changed files with 40 additions and 0 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -8,5 +8,6 @@
|
||||||
./nfs-server.nix
|
./nfs-server.nix
|
||||||
./dns.nix
|
./dns.nix
|
||||||
./traefik.nix
|
./traefik.nix
|
||||||
|
./home-assistant.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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"''
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
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