From 1a64deeb894dc95e2645a75771732c6cc53a79ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Wed, 4 Oct 2023 01:35:06 +0200 Subject: Squash changes containing private information There were a lot of changes since the previous commit, but a lot of them contained personnal information about users. All thos changes got stashed into a single commit (history is kept in a different place) and private information was moved in a separate private repository --- modules/private/websites/tools/git/gitweb.nix | 119 -------------------------- 1 file changed, 119 deletions(-) delete mode 100644 modules/private/websites/tools/git/gitweb.nix (limited to 'modules/private/websites/tools/git/gitweb.nix') diff --git a/modules/private/websites/tools/git/gitweb.nix b/modules/private/websites/tools/git/gitweb.nix deleted file mode 100644 index ff34da5..0000000 --- a/modules/private/websites/tools/git/gitweb.nix +++ /dev/null @@ -1,119 +0,0 @@ -{ gitweb, writeText, stdenv, coreutils, writeScript, gitolite, git, cgit, gitoliteDir, mailcap, highlight }: -rec { - varDir = gitoliteDir; - config = writeText "gitweb.conf" '' - $git_temp = "/tmp"; - - # The directories where your projects are. Must not end with a - # slash. - $projectroot = "${varDir}/repositories"; - - $projects_list = "${varDir}/projects.list"; - $strict_export = "true"; - - # Base URLs for links displayed in the web interface. - our @git_base_url_list = qw(ssh://gitolite@git.immae.eu https://git.immae.eu); - - $feature{'blame'}{'default'} = [1]; - $feature{'avatar'}{'default'} = ['gravatar']; - $feature{'highlight'}{'default'} = [1]; - - @stylesheets = ("gitweb-theme/gitweb.css"); - $logo = "gitweb-theme/git-logo.png"; - $favicon = "gitweb-theme/git-favicon.png"; - $javascript = "gitweb-theme/gitweb.js"; - $logo_url = "https://git.immae.eu/"; - $projects_list_group_categories = "true"; - $projects_list_description_width = 60; - $project_list_default_category = "__Others__"; - $highlight_bin = "${highlight}/bin/highlight"; - ''; - aboutFilter = writeScript "about-filter.sh" '' - #!${stdenv.shell} - - if [ -f "$CGIT_REPO_PATH/README.html" ]; then - cat "$CGIT_REPO_PATH/README.html" - else - ${cgit}/lib/cgit/filters/about-formatting.sh "$@" - fi - ''; - cgitConfig = writeText "cgitrc" '' - css=/cgit-css/cgit.css - logo=/cgit-css/cgit.png - favicon=/cgit-css/favicon.ico - - root-title=Immae’s git - root-desc=To go back to the old interface: https://git.immae.eu/?old - readme=:README.md - readme=:readme.md - readme=:README - readme=:DOCUMENTATION.md - about-filter=${aboutFilter} - #${cgit}/lib/cgit/filters/about-formatting.sh - source-filter=${cgit}/lib/cgit/filters/syntax-highlighting.py - - enable-blame=1 - enable-index-links=1 - enable-commit-graph=1 - enable-log-filecount=1 - enable-log-linecount=1 - - enable-html-serving=1 - # Allow using gitweb.* keys - enable-git-config=1 - - side-by-side-diffs=1 - snapshots=tar.gz tar.zst zip - mimetype-file=${mailcap}/etc/mime.types - - section=__Others__ - clone-url=ssh://gitolite@git.immae.eu/$CGIT_REPO_URL https://git.immae.eu/$CGIT_REPO_URL - #section-from-path=1 - project-list=${varDir}/projects.list - scan-path=${varDir}/repositories - ''; - apache = rec { - user = "wwwrun"; - group = "wwwrun"; - modules = [ "cgid" ]; - root = gitweb; - vhostConf = '' - SetEnv GIT_PROJECT_ROOT ${varDir}/repositories/ - ScriptAliasMatch \ - "(?x)^/(.*/(HEAD | \ - info/refs | \ - objects/(info/[^/]+ | \ - [0-9a-f]{2}/[0-9a-f]{38} | \ - pack/pack-[0-9a-f]{40}\.(pack|idx)) | \ - git-(upload|receive)-pack))$" \ - ${git}/libexec/git-core/git-http-backend/$1 - - - Require all granted - - - DirectoryIndex gitweb.cgi - Require all granted - AllowOverride None - Options ExecCGI FollowSymLinks - - SetHandler cgi-script - SetEnv GITWEB_CONFIG "${config}" - - - - SetEnv CGIT_CONFIG ${cgitConfig} - ScriptAlias /cgit "${cgit}/cgit/cgit.cgi/" - Alias /cgit-css "${cgit}/cgit" - - AllowOverride None - Options ExecCGI FollowSymlinks - Require all granted - - - RewriteEngine On - RewriteCond %{QUERY_STRING} ^$ - RewriteRule ^/?$ /cgit [L,R=302] - ''; - }; -} -- cgit v1.2.3