about summary refs log tree commit diff
path: root/ops/nixos/camden
diff options
context:
space:
mode:
Diffstat (limited to 'ops/nixos/camden')
-rw-r--r--ops/nixos/camden/default.nix32
1 files changed, 30 insertions, 2 deletions
diff --git a/ops/nixos/camden/default.nix b/ops/nixos/camden/default.nix
index 9d8005961542..1039cb2a212b 100644
--- a/ops/nixos/camden/default.nix
+++ b/ops/nixos/camden/default.nix
@@ -8,6 +8,7 @@ config: let
 in lib.fix(self: {
   imports = [
     ../modules/depot.nix
+    ../modules/hound.nix
   ];
   depot = depot;
 
@@ -107,7 +108,6 @@ in lib.fix(self: {
     (with depot; [
       fun.idual.script
       fun.idual.setAlarm
-      third_party.git
       third_party.honk
       third_party.pounce
     ]) ++
@@ -119,6 +119,7 @@ in lib.fix(self: {
       direnv
       emacs26-nox
       gnupg
+      git
       htop
       jq
       pass
@@ -213,6 +214,7 @@ in lib.fix(self: {
       group = "nginx";
       webroot = "/var/lib/acme/acme-challenge";
       extraDomains = {
+        "cs.tazj.in" = null;
         "git.tazj.in" = null;
         "www.tazj.in" = null;
 
@@ -239,7 +241,21 @@ in lib.fix(self: {
     applicationCredentials = "/etc/gcp/key.json";
   };
 
-  # serve my website
+  # Serve a code search (hound) instance
+  services.depot.hound = {
+    enable = true;
+    title = "tazjin's depot";
+    repos.depot = {
+      url = "file:///var/git/depot";
+      vcs = "git";
+      url-pattern = {
+        base-url = "https://git.tazj.in/tree/{path}{anchor}";
+        anchor = "#n{line}";
+      };
+    };
+  };
+
+  # serve my website(s)
   services.nginx = {
     enable = true;
     enableReload = true;
@@ -357,6 +373,18 @@ in lib.fix(self: {
         }
       '';
     };
+
+    virtualHosts.hound = {
+      serverName = "cs.tazj.in";
+      useACMEHost = "tazj.in";
+      forceSSL = true;
+
+      extraConfig = ''
+        location / {
+          proxy_pass http://localhost:6080;
+        }
+      '';
+    };
   };
 
   # Timer units that can be started with systemd-run to set my alarm.