diff options
Diffstat (limited to 'modules/cgit.nix')
| -rw-r--r-- | modules/cgit.nix | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/modules/cgit.nix b/modules/cgit.nix index 058fc79..de15e08 100644 --- a/modules/cgit.nix +++ b/modules/cgit.nix @@ -8,12 +8,14 @@ # - git clone/pull over HTTPS: public, read-only via git-http-backend # - git push: SSH only, using the "git" user + your authorized keys # -# Caddy routes: -# /git/* -> fcgiwrap serving git-http-backend (port 8085 via nginx shim) -# /* -> cgit (port 8086 via nginx shim) -# -# Both cgit and git-http-backend are served through a minimal nginx instance -# bound to localhost, which Caddy then reverse-proxies. +# The NixOS cgit module serves both cgit browsing and git-http-backend +# (clone/pull, via gitHttpBackend.enable which defaults to true) on the +# *same* nginx vhost/location - nginx tells them apart by matching the +# request path against a regex (.../info/refs|git-upload-pack for the +# smart-HTTP protocol), not by a separate port. That combined vhost is +# bound to localhost:8086 below, and Caddy reverse-proxies everything +# for git.karanj.com straight to it. Only git-upload-pack is wired up, so +# push over HTTP is impossible regardless - push stays SSH-only. { # Dedicated git user for SSH push access users.users.git = { |
