aboutsummaryrefslogtreecommitdiff
path: root/hosts/tower/web/git.nix
diff options
context:
space:
mode:
authorIsabella Bastaja <isabella@sorre.xyz>2026-08-18 20:07:35 +0200
committerIsabella Bastaja <isabella@sorre.xyz>2026-08-20 22:00:12 +0200
commitdcd2c4c4d71161301a956b7e4777b499f5010e74 (patch)
tree91945b57a045cb79bd83e58e898f28c3a626c53c /hosts/tower/web/git.nix
parentb57bf02455c97a70efb22c6c7805f4df87c8b998 (diff)
tower: init
Diffstat (limited to 'hosts/tower/web/git.nix')
-rw-r--r--hosts/tower/web/git.nix55
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;
+ };
+}