34 lines
1.0 KiB
Nix
34 lines
1.0 KiB
Nix
{ ... }: {
|
|
virtualisation.oci-containers = {
|
|
backend = "podman";
|
|
containers.homeassistant = {
|
|
volumes = [ "home-assistant:/config" ];
|
|
environment.TZ = "Europe/Vienna";
|
|
image = "ghcr.io/home-assistant/home-assistant:2023.9.3";
|
|
extraOptions = [
|
|
"--ip=10.42.97.20"
|
|
"--device=/dev/serial/by-id/usb-EnOcean_GmbH_EnOcean_USB_300_DC_FT5OI9YG-if00-port0:/dev/serial/by-id/usb-EnOcean_GmbH_EnOcean_USB_300_DC_FT5OI9YG-if00-port0"
|
|
];
|
|
};
|
|
};
|
|
|
|
services.nginx.virtualHosts."home-assistant.cloonar.com" = {
|
|
forceSSL = true;
|
|
enableACME = true;
|
|
acmeRoot = null;
|
|
extraConfig = ''
|
|
proxy_buffering off;
|
|
'';
|
|
locations."/".extraConfig = ''
|
|
proxy_pass http://127.0.0.1:8123;
|
|
proxy_set_header Host $host;
|
|
proxy_redirect http:// https://;
|
|
proxy_http_version 1.1;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
proxy_set_header Connection $connection_upgrade;
|
|
'';
|
|
};
|
|
}
|
|
|