about summary refs log tree commit diff
path: root/nix/tazserve.nix
diff options
context:
space:
mode:
authorVincent Ambo <tazjin@gmail.com>2018-01-02T11·08+0100
committerVincent Ambo <tazjin@gmail.com>2018-01-02T11·08+0100
commita9401f94db8eb4d1de439a32f748b2b8f5e598a7 (patch)
tree9fbf13977c3ca7e63c933645c2d64a94b4266e88 /nix/tazserve.nix
parent9da69a79626fdad87a970837fb9f269ecd16d1fe (diff)
feat(nix): Configure Gogs setup
Diffstat (limited to 'nix/tazserve.nix')
-rw-r--r--nix/tazserve.nix21
1 files changed, 20 insertions, 1 deletions
diff --git a/nix/tazserve.nix b/nix/tazserve.nix
index 53a94f6684f8..97e6313587e9 100644
--- a/nix/tazserve.nix
+++ b/nix/tazserve.nix
@@ -9,7 +9,7 @@ tazblog = import ./tazblog { inherit blogSource; };
 blog = tazblog.tazblog;
 blogConfig = {
   enableACME = true;
-  addSSL = true;
+  forceSSL = true;
   locations."/" = {
     proxyPass = "http://127.0.0.1:8000";
   };
@@ -38,13 +38,32 @@ in {
     wantedBy              = [ "multi-user.target" ];
   };
 
+  # Set up Gogs
+  services.gogs = {
+    enable       = true;
+    appName      = "Gogs: tazjin's private code";
+    cookieSecure = true;
+    domain       = "git.tazj.in";
+    rootUrl      = "https://git.tazj.in/";
+  };
+
   # Set up reverse proxy
   services.nginx = {
     enable = true;
     recommendedTlsSettings = true;
     recommendedProxySettings = true;
 
+    # Blog!
     virtualHosts."tazj.in" = blogConfig;
     virtualHosts."www.tazj.in" = blogConfig;
+
+    # Git!
+    virtualHosts."git.tazj.in" = {
+      enableACME = true;
+      forceSSL   = true;
+      locations."/" = {
+        proxyPass = "http://127.0.0.1:3000";
+      };
+    };
   };
 }