diff options
Diffstat (limited to 'services/cgit.nix')
| -rw-r--r-- | services/cgit.nix | 40 |
1 files changed, 18 insertions, 22 deletions
diff --git a/services/cgit.nix b/services/cgit.nix index aeb7115..8b87f80 100644 --- a/services/cgit.nix +++ b/services/cgit.nix @@ -7,7 +7,7 @@ let cgit = pkgs.cgit-pink; - cgitLocalPort = "3792"; + cgitLocalPort = 3792; cgitDir = "/srv/cgit"; gitDir = "/srv/git"; @@ -35,26 +35,22 @@ let in { - virtualisation.oci-containers.containers = { - cgit = { - # TODO: see above. replace with `imageStream`. - imageFile = cgitImage; - image = "cgit:${cgit.version}"; # has to match `imageFile`. - ports = [ "127.0.0.1:${cgitLocalPort}:80"]; - - volumes = [ - "${cgitDir}/config/cgitrc:/etc/cgitrc" - "${cgitDir}/config/lighttpd.conf:/etc/lighttpd/cgit.conf" - "${cgitDir}/data:/data" - - "${gitDir}:/var/www/cgit" - ]; - - entrypoint = "${pkgs.lighttpd}/bin/lighttpd"; - cmd = [ - "-D" # run in foreground - "-f" "/etc/lighttpd/cgit.conf" - ]; - }; + foundation.services.cgit = { + image = { imageFile = cgitImage; image = "cgit:${cgit.version}"; }; + ports = [ [ cgitLocalPort 80 ] ]; + + volumes = [ + [ "${cgitDir}/config/cgitrc" "/etc/cgitrc" ] + [ "${cgitDir}/config/lighttpd.conf" "/etc/lighttpd/cgit.conf" ] + [ "${cgitDir}/data" "/data" ] + + [ "${gitDir}" "/var/www/cgit" ] + ]; + + entrypoint = "${pkgs.lighttpd}/bin/lighttpd"; + cmd = [ + "-D" # run in foreground + "-f" "/etc/lighttpd/cgit.conf" + ]; }; } |
