From a20ca17ece0f463bf62673c332d2f247b96faf39 Mon Sep 17 00:00:00 2001 From: Mike Vink Date: Tue, 9 Jan 2024 01:52:12 +0100 Subject: add nginx --- profiles/homeserver/nginx.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/profiles/homeserver/nginx.nix b/profiles/homeserver/nginx.nix index cd847ba..293ae8d 100644 --- a/profiles/homeserver/nginx.nix +++ b/profiles/homeserver/nginx.nix @@ -4,6 +4,8 @@ type = types.attrsOf (types.submodule ({ name, ... }: { config = mkIf (name != "default") { forceSSL = mkDefault true; + sslCertificateKey = "/var/lib/acme/vinkies.net/key.pem"; + sslCertificate = "/var/lib/acme/vinkies.net/fullchain.pem"; }; })); }; @@ -15,7 +17,19 @@ recommendedProxySettings = true; recommendedGzipSettings = true; recommendedOptimisation = true; + virtualHosts."cal.${ivi.domain}" = { + locations."/" = { + proxyPass = "http://127.0.0.1:5232"; + }; + }; + }; + systemd.services.nginx.serviceConfig = { + SupplementaryGroups = [ "acme" ]; }; networking.firewall.allowedTCPPorts = [ 80 443 ]; + services.radicale = { + enable = true; + settings.server.hosts = [ "0.0.0.0:5232" ]; + }; }; } -- cgit v1.2.3