diff options
author | Vincent Ambo <tazjin@google.com> | 2020-05-26T00·19+0000 |
---|---|---|
committer | Vincent Ambo <tazjin@google.com> | 2020-05-26T00·19+0000 |
commit | b9b741287a81ea5bc89b3dc865ed38315b465824 (patch) | |
tree | ceb90712e58b48c7021fd7a212c6b27c19e7b108 | |
parent | 587b0a8b0be72468214d2b98df3d3b83677c9abb (diff) |
feat(ops/nixos/camden): Set up hound at cs.tazj.in r/855
-rw-r--r-- | ops/nixos/camden/default.nix | 32 |
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. |