os/hosts/chonk/home-assistant.nix

27 lines
588 B
Nix

{
self,
pkgs,
config,
...
}: {
# HTTP
services.nginx.virtualHosts = let
makeVirtualHost = target: {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = target;
proxyWebsockets = true;
extraConfig = ''
proxy_ssl_server_name on;
proxy_pass_header Authorization;
'';
};
};
in {
"ha.gssws.de" = makeVirtualHost "http://10.0.1.11:8123";
"ha2.gssws.de" = makeVirtualHost "http://10.0.1.11:8123";
"ha.karinsokolowski.de" = makeVirtualHost "http://10.0.1.13:8123";
};
}