git.rustymanta.xyz {
    @git {
        header User-Agent git/*
    }

    route {
        handle /cgit.* {
            root * /usr/share/webapps/cgit
            file_server
        }

        handle @git {
            cgi * /usr/libexec/git-core/git-http-backend {
                env GIT_PROJECT_ROOT=/git-repos GIT_HTTP_EXPORT_ALL=1 GIT_HTTP_RECEIVEPACK=0
            }
        }

        handle {
            cgi * /usr/share/webapps/cgit/cgit.cgi {
                env CGIT_CONFIG=/cgitrc
            }
        }
    }
}
