summaryrefslogtreecommitdiff
path: root/depo/nutin-madaj/git.nix
diff options
context:
space:
mode:
Diffstat (limited to 'depo/nutin-madaj/git.nix')
-rw-r--r--depo/nutin-madaj/git.nix65
1 files changed, 65 insertions, 0 deletions
diff --git a/depo/nutin-madaj/git.nix b/depo/nutin-madaj/git.nix
new file mode 100644
index 0000000..ef86d52
--- /dev/null
+++ b/depo/nutin-madaj/git.nix
@@ -0,0 +1,65 @@
+{ pkgs, ... }:
+
+let
+ benKey = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCiNB0iF9ClawNEizBtdYucqp1tAXXRbqvlPS6PFRrtiwSl+SJD29BCLgA5rLxcmFhBHZ/iId/En7GPFEzI/gMu071J7pUI4OcW0UVZju3GNc6ZEz/a6AD2u79JiXEDHfPEdmMqAe36kkaK0KJWSQP3xsFRwJ+8F8HHbSwoCLL+GJhBgAWHQLGfKesNrDacNljNDU3CgkEnDmu8QKuSzH2k1vrr69q2u2iMSAdiStDBAWEjN5nCVrm2XB2vmFLMtXpX2n8JI+znOGzRRDc8dNXejQeDMZGyV6jfVidEIX7vdgSydGjTRKcCLVAsKY3z0gYBZ8u8EUNujgcFBnnAvytj ben@neb";
+ gitDir = "/srv/git";
+in
+{
+ services = {
+ gitolite = {
+ enable = true;
+ enableGitAnnex = true;
+ dataDir = "${gitDir}";
+ user = "git";
+ group = "git";
+ extraGitoliteRc = ''
+ $RC{SITE_INFO} = 'a computer is a bicycle for the mind.';
+ $RC{GIT_CONFIG_KEYS} = 'gitweb\.(owner|description|category)';
+ '';
+ adminPubkey = "${benKey}";
+ };
+ lighttpd = {
+ enable = true;
+ port = 8000;
+ document-root = "/srv/www";
+ mod_userdir = true;
+ mod_status = true;
+ collectd = {
+ enable = true;
+ };
+ cgit = {
+ # disable cgit for now; the ssh interface still works anyway.
+ enable = false;
+ subdir = "git";
+ configText = ''
+ cache-size=0
+ clone-url=git@simatime.com:$CGIT_REPO_URL
+ enable-index-owner=1
+ enable-http-clone=0
+ enable-index-links=1
+ enable-commit-graph=1
+ enable-log-filecount=1
+ enable-log-linecount=1
+ enable-git-config=1
+ remove-suffix=1
+ branch-sort=age
+ max-stats=week
+ mimetype.gif=image/gif
+ mimetype.html=text/html
+ mimetype.jpg=image/jpeg
+ mimetype.jpeg=image/jpeg
+ mimetype.pdf=application/pdf
+ mimetype.png=image/png
+ mimetype.svg=image/svg+xml
+ about-filter=${pkgs.cgit}/lib/cgit/filters/about-formatting.sh
+ source-filter=${pkgs.cgit}/lib/cgit/filters/syntax-highlighting.py
+ readme=:README.md
+ root-title=simatime git repository
+ root-desc=a computer is a bicycle for the mind.
+ project-list=${gitDir}/projects.list
+ scan-path=${gitDir}/repositories
+ '';
+ };
+ };
+ };
+}