diff options
Diffstat (limited to 'hosts/tower/web/git.nix')
| -rw-r--r-- | hosts/tower/web/git.nix | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/hosts/tower/web/git.nix b/hosts/tower/web/git.nix new file mode 100644 index 0000000..4dcae8e --- /dev/null +++ b/hosts/tower/web/git.nix @@ -0,0 +1,55 @@ +{ config, ... }: +let + # secrets = config.sops.secrets; + domainInternal = "git.sorre.internal"; + domainPublic = "git.sorre.xyz"; + + commonSettings = { + readme = "main:README.md"; + }; +in +{ + services.nginx = { + enable = true; + virtualHosts."${domainInternal}" = { + # forceSSL = true; + # sslCertificateKey = secrets."wg-ca-key".path; + # sslCertificate = secrets."wg-ca-crt".path; + listen = [ + { + addr = "100.64.0.3"; + port = 443; + # ssl = true; + } + ]; + }; + + virtualHosts."${domainPublic}" = { + # enableACME = true; + # forceSSL = true; + }; + }; + + services.cgit.internal = { + enable = true; + user = "cgit-internal"; + group = "cgit"; + nginx.virtualHost = domainInternal; + gitHttpBackend.checkExportOkFiles = false; + scanPath = "/var/lib/git/repos/isabella"; + settings = commonSettings; + }; + + services.cgit.public = { + enable = true; + user = "cgit-public"; + group = "cgit"; + nginx.virtualHost = domainPublic; + gitHttpBackend.checkExportOkFiles = false; + repos = { + futils.path = "/var/lib/git/repos/isabella/futils"; + nixos-config.path = "/var/lib/git/repos/isabella/nixos-config"; + }; + settings = commonSettings; + }; +} |
