about summary refs log tree commit diff
path: root/modules
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-06-23 17:35:54 -0700
committerFranck Cuny <franck@fcuny.net>2022-06-23 18:02:27 -0700
commit4d4219c7a511979d6bb95c3f65c4010fbc5435be (patch)
treee604d98bed2841d5aa59f85b830d74cd71c30799 /modules
parentfeat(hosts/home): use fish as my default shell everywhere (diff)
downloadworld-4d4219c7a511979d6bb95c3f65c4010fbc5435be.tar.gz
fix(modules/cgit): make cgit the default server for nginx
If a request goes through nginx without a Host header set, the default
site we serve is cgit.

Without this option, nginx will pick the first site defined in the
configuration, which is not what I want. I want to be specific about
what is the default.

Change-Id: If131b80c1488510e79d60ef6de5bb9db4fa18d58
Reviewed-on: https://cl.fcuny.net/c/world/+/482
Tested-by: CI
Reviewed-by: Franck Cuny <franck@fcuny.net>
Diffstat (limited to 'modules')
-rw-r--r--modules/services/cgit/default.nix4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/services/cgit/default.nix b/modules/services/cgit/default.nix
index 3d83a70..b4e82ab 100644
--- a/modules/services/cgit/default.nix
+++ b/modules/services/cgit/default.nix
@@ -96,6 +96,10 @@ in
     };
 
     services.nginx.virtualHosts."git.fcuny.net" = {
+      # make cgit the default site: if a request goes through nginx
+      # without a host header, this will be the default site we serve
+      # for that request.
+      default = true;
       forceSSL = true;
       enableACME = true;
       locations = {