From b9b741287a81ea5bc89b3dc865ed38315b465824 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Tue, 26 May 2020 00:19:27 +0000 Subject: feat(ops/nixos/camden): Set up hound at cs.tazj.in --- ops/nixos/camden/default.nix | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) (limited to 'ops/nixos') 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. -- cgit 1.4.1