summaryrefslogtreecommitdiff
path: root/hosts/chaski/services/cgit.nix
diff options
context:
space:
mode:
authorstuebinm2021-04-17 16:09:28 +0200
committerstuebinm2021-04-17 16:09:28 +0200
commit022c17185b8b90515cb2c9b1ae039a9ab190db91 (patch)
treed31d7078f59613615ec2c49b3e243c39d36e4eed /hosts/chaski/services/cgit.nix
parente1359d9565f4fed555a9aeffae2a83458564f046 (diff)
cgit: chaski -> flora; general cleanup
Diffstat (limited to 'hosts/chaski/services/cgit.nix')
-rw-r--r--hosts/chaski/services/cgit.nix94
1 files changed, 0 insertions, 94 deletions
diff --git a/hosts/chaski/services/cgit.nix b/hosts/chaski/services/cgit.nix
deleted file mode 100644
index 094bfd5..0000000
--- a/hosts/chaski/services/cgit.nix
+++ /dev/null
@@ -1,94 +0,0 @@
-{pkgs, config, ...}:
-
-{
- containers.cgit = {
- autoStart = true;
- privateNetwork = true;
- hostAddress6 = "fd00::42:12";
- localAddress6 = "fd00::42:13";
-
- bindMounts."/git" = {
- hostPath = "/var/git/public";
- isReadOnly = true;
- };
-
- config = {pkgs, config, ...}: {
- services.lighttpd.enable = true;
- services.lighttpd.extraConfig = ''server.use-ipv6 = "enable"'';
- services.lighttpd.cgit = {
- enable = true;
- subdir = "git";
- configText = ''
- source-filter=${pkgs.cgit}/lib/cgit/filters/syntax-highlighting.py
- about-filter=${pkgs.cgit}/lib/cgit/filters/about-formatting.sh
- cache-size=1000
- logo=/git/cgit.png
- favicon=/git/favicon.ico
-
- # take css from an assumed repo `config`
- css=/git/config/plain/cgit.css
-
- # remove .git extensions from repo names
- remove-suffix=1
-
- # readme formats which may be parsed
- readme=:README.md
- readme=:README
- readme=:README.txt
- readme=:README.org
-
- # allow cloning repos
- enable-http-clone=1
-
- enable-follow-links=1
- enable-html-serving=1
- enable-index-owner=0
-
- mimetype.css=text/css
- mimetype.jpg=image/jpeg
- mimetype.jpeg=image/jpeg
- mimetype.pdf=application/pdf
- mimetype.png=image/png
- mimetype.svg=image/svg+xml
-
- # some nice formatting
- root-title=An Assortment of Stuff
- root-desc=hand-squished into git repos
- enable-commit-graph=1
- enable-log-linecount=1
- enable-log-filecount=1
- branch-sort=age
- # suppress email addresses in html logs
- noplainemail=1
-
- # maximum file size for plain blobs in kilobyte
- max-blob-size=100
-
- cache-scanrc-ttl=1
-
- scan-path=/git
- '';
- };
-
- networking.firewall.allowedTCPPorts = [ 80 ];
- };
- };
-
- services.nginx.recommendedProxySettings = true;
- services.nginx.virtualHosts."stuebinm.eu" = {
- locations."/git/".proxyPass = "http://[${config.containers.cgit.localAddress6}]";
- enableACME = true;
- forceSSL = true;
- };
-
- # user for git repo administration
- users.users.git = {
- openssh.authorizedKeys.keys = config.users.users.root.openssh.authorizedKeys.keys;
- home = "/var/git";
- isNormalUser = true;
- packages = [ pkgs.git ];
- };
-
- networking.firewall.allowedTCPPorts = [ 80 443 ];
-
-}