diff options
author | Ben Sima <ben@bsima.me> | 2019-05-13 17:37:27 -0700 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2019-05-13 17:37:27 -0700 |
commit | bd4e4dfefd73ed578be8bdac3b1fda6f21482979 (patch) | |
tree | 1a3e59d184aa5d2a1b0f8f905878cea8ede36fab /depo/nutin-madaj/git.nix | |
parent | 45f72cbf8ac58a8dd528c656482356c0933ed61f (diff) |
refactor nutin-madaj nix code
Diffstat (limited to 'depo/nutin-madaj/git.nix')
-rw-r--r-- | depo/nutin-madaj/git.nix | 65 |
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 + ''; + }; + }; + }; +} |