diff --git a/nixos/hosts/ingress-proxy/default.nix b/nixos/hosts/ingress-proxy/default.nix index 4ff8c0b..4b942f6 100644 --- a/nixos/hosts/ingress-proxy/default.nix +++ b/nixos/hosts/ingress-proxy/default.nix @@ -23,7 +23,21 @@ in { hsb.servers."${tsHost "happystaticbuzz" 8080}" = {}; }; - virtualHosts = { + virtualHosts = let + static = { src ? null, url, ref, aliases ? [] }: { + http2 = true; + http3 = true; + forceSSL = true; + enableACME = true; + + serverAliases = aliases; + + root = pkgs.stdenvNoCC.mkDerivation { + src = src ? builtins.fetchGit { inherit url ref; }; + installPhase = "cp -r $src $out"; + }; + }; + in { # Matrix (main) "mx.sapphic.engineer" = { forceSSL = true; @@ -73,21 +87,13 @@ in { ''; }; - "mekanoe.com" = { - http2 = true; - http3 = true; - forceSSL = true; - enableACME = true; + "mekanoe.com" = static { + url = "https://codeberg.org/noe/personal-site.git"; + rev = "8601d3a426bc07c715f265b2132b384c21397533"; + }; - root = pkgs.stdenvNoCC.mkDerivation { - name = "mekanoe.com"; - src = builtins.fetchGit { - url = "https://codeberg.org/noe/personal-site.git"; - ref = "main"; - rev = "8601d3a426bc07c715f265b2132b384c21397533"; - }; - installPhase = "cp -r $src $out"; - }; + "oc.mekanoe.com" = static { + src = pkgs.writeText "oc.mekanoe.com" "down"; }; # Generic store for /.well-known/ paths.