From bd4e4dfefd73ed578be8bdac3b1fda6f21482979 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 13 May 2019 17:37:27 -0700 Subject: refactor nutin-madaj nix code --- depo/nutin-madaj/git.nix | 65 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 depo/nutin-madaj/git.nix (limited to 'depo/nutin-madaj/git.nix') 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 + ''; + }; + }; + }; +} -- cgit v1.2.3