about summary refs log tree commit diff
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2020-06-20T02·58+0100
committertazjin <mail@tazj.in>2020-06-20T03·00+0000
commitd18faddba3281d543c6e552d514513bd6256032f (patch)
treeef6a81788e290b4055f47c0d993b27aeba6386eb
parent082ed2a74f61fb8f1e750dfd59925070d60ac7bf (diff)
chore(nixos/sourcegraph): Configure Sourcegraph to use Cheddar r/1046
Change-Id: I2b91bef97c16254ffefcbc4da48ef161a859e7a0
Reviewed-on: https://cl.tvl.fyi/c/depot/+/521
Reviewed-by: lukegb <lukegb@tvl.fyi>
-rw-r--r--ops/nixos/sourcegraph.nix2
-rw-r--r--users/tazjin/nixos/camden/default.nix11
2 files changed, 13 insertions, 0 deletions
diff --git a/ops/nixos/sourcegraph.nix b/ops/nixos/sourcegraph.nix
index dcb12f2c1060..b82194cacc84 100644
--- a/ops/nixos/sourcegraph.nix
+++ b/ops/nixos/sourcegraph.nix
@@ -21,6 +21,8 @@ in {
         "/var/lib/sourcegraph/etc:/etc/sourcegraph"
         "/var/lib/sourcegraph/data:/var/opt/sourcegraph"
       ];
+
+      environment.SRC_SYNTECT_SERVER = "http://172.17.0.1:4238";
     };
   };
 }
diff --git a/users/tazjin/nixos/camden/default.nix b/users/tazjin/nixos/camden/default.nix
index fdc48e596ba4..5b751c0338c1 100644
--- a/users/tazjin/nixos/camden/default.nix
+++ b/users/tazjin/nixos/camden/default.nix
@@ -244,6 +244,17 @@ in lib.fix(self: {
   # Run a SourceGraph code search instance
   services.depot.sourcegraph.enable = true;
 
+  # Run a cheddar syntax highlighting server for SourceGraph
+  systemd.services.cheddar-server = {
+    wantedBy = [ "multi-user.target" ];
+    script = "${depot.tools.cheddar}/bin/cheddar --listen 0.0.0.0:4238 --sourcegraph-server";
+
+    serviceConfig = {
+      DynamicUser = true;
+      Restart = "always";
+    };
+  };
+
   # Start a local SMTP relay to Gmail (used by gerrit)
   services.depot.smtprelay = {
     enable = true;