From c6b2300f4b0afe662c06854b61813cc546f4d510 Mon Sep 17 00:00:00 2001 From: h7x4 Date: Sat, 30 Mar 2024 00:02:22 +0100 Subject: [PATCH] bekkalokk: redirect bekkalokk.pvv.ntnu.no to git.pvv.ntnu.no --- hosts/bekkalokk/services/nginx/default.nix | 6 ++++++ hosts/bekkalokk/services/openldap.nix | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 hosts/bekkalokk/services/openldap.nix diff --git a/hosts/bekkalokk/services/nginx/default.nix b/hosts/bekkalokk/services/nginx/default.nix index a1a2253..38832be 100644 --- a/hosts/bekkalokk/services/nginx/default.nix +++ b/hosts/bekkalokk/services/nginx/default.nix @@ -16,6 +16,12 @@ recommendedProxySettings = true; recommendedOptimisation = true; recommendedGzipSettings = true; + + virtualHosts."bekkalokk.pvv.ntnu.no" = { + enableACME = true; + forceSSL = true; + locations."/".return = "301 $scheme://git.pvv.ntnu.no$request_uri"; + }; }; networking.firewall.allowedTCPPorts = [ 80 443 ]; diff --git a/hosts/bekkalokk/services/openldap.nix b/hosts/bekkalokk/services/openldap.nix new file mode 100644 index 0000000..1e3cedc --- /dev/null +++ b/hosts/bekkalokk/services/openldap.nix @@ -0,0 +1,6 @@ +{ ... }: +{ + services.openldap = { + enable = true; + }; +}