summary refs log tree commit diff stats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--system/services/default.nix1
-rw-r--r--system/services/redirects/default.nix12
2 files changed, 13 insertions, 0 deletions
diff --git a/system/services/default.nix b/system/services/default.nix
index 9998e43..974bb40 100644
--- a/system/services/default.nix
+++ b/system/services/default.nix
@@ -14,6 +14,7 @@
     ./nix
     ./nix-sync
     ./openssh
+    ./redirects
     ./rust-motd
     ./snapper
     ./taskserver
diff --git a/system/services/redirects/default.nix b/system/services/redirects/default.nix
new file mode 100644
index 0000000..0f66e2b
--- /dev/null
+++ b/system/services/redirects/default.nix
@@ -0,0 +1,12 @@
+{...}: {
+  services.nginx = {
+    enable = true;
+    virtualHosts."source.vhack.eu" = {
+      # Redirect all request to the codeberg source
+      locations."/".return = "301 https://codeberg.org/vhack.eu/nixos-server";
+
+      enableACME = true;
+      forceSSL = true;
+    };
+  };
+}