+
+ services = {
+ caddy.virtualHosts."git.ayoreis.com".extraConfig = let
+ gitweb = pkgs.gitweb;
+ in ''
+ @git header User-Agent git/*
+ root ${gitweb}
+ file_server /static/*
+
+ cgi @git ${pkgs.git}/bin/git-http-backend {
+ env GIT_PROJECT_ROOT=${home}
+ }
+
+ cgi ${gitweb}/gitweb.cgi {
+ env GITWEB_CONFIG=${config.services.gitweb.gitwebConfigFile}
+ }
+ '';
+
+ gitweb.extraConfig = ''
+ our $export_ok = "git-daemon-export-ok";
+ our $site_name = "Repositories";
+ $feature{'pathinfo'}{'default'} = [1];
+ '';
+ };
+
+ programs.git = {
+ enable = true;
+ config.safe.directory = "*";
+ };