From eb886933227e8949c576f6b2bfea803f4536f489 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Mon, 1 Jul 2024 01:22:08 +0300 Subject: [PATCH] 11sync.net: bring back on fra1-a for now --- hosts/fra1-a/configuration.nix | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/hosts/fra1-a/configuration.nix b/hosts/fra1-a/configuration.nix index 0945863..26f8983 100644 --- a/hosts/fra1-a/configuration.nix +++ b/hosts/fra1-a/configuration.nix @@ -1,5 +1,7 @@ { + lib, config, + pkgs, myData, modulesPath, ... @@ -117,6 +119,30 @@ }; services = { + caddy = { + enable = true; + email = "motiejus+acme@jakstys.lt"; + globalConfig = '' + servers { + metrics + } + ''; + virtualHosts = { + "www.11sync.net".extraConfig = '' + redir https://jakstys.lt/2024/11sync-shutdown/ + ''; + "11sync.net".extraConfig = lib.mkForce '' + redir https://jakstys.lt/2024/11sync-shutdown/ + ''; + "http://admin.11sync.net".extraConfig = '' + @denied not remote_ip ${myData.subnets.tailscale.cidr} + + redir / /admin/ + ${builtins.readFile "${pkgs.e11sync-caddyfile}"} + ''; + }; + }; + nsd = { enable = true; interfaces = ["0.0.0.0" "::"];