os/hosts/chonk/home-assistant.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
589 B
Nix
Raw Normal View History

2023-02-25 13:45:21 +00:00
{
self,
pkgs,
config,
...
}: {
# HTTP
2023-06-12 15:06:55 +00:00
services.nginx.virtualHosts = let
makeVirtualHost = target: {
2023-02-25 13:45:21 +00:00
enableACME = true;
forceSSL = true;
locations."/" = {
2023-06-12 15:06:55 +00:00
proxyPass = target;
2023-02-25 13:45:21 +00:00
proxyWebsockets = true;
2023-06-12 15:06:55 +00:00
extraConfig = ''
proxy_ssl_server_name on;
proxy_pass_header Authorization;
'';
2023-02-25 13:45:21 +00:00
};
};
2023-06-12 15:06:55 +00:00
in {
"ha.gssws.de" = makeVirtualHost "http://10.0.1.254:8123";
"ha2.gssws.de" = makeVirtualHost "http://10.0.1.11:8123";
"ha.karinsokolowski.de" = makeVirtualHost "http://10.0.1.13:8123";
2023-02-25 13:45:21 +00:00
};
}