about summary refs log tree commit diff
diff options
context:
space:
mode:
authorEmile <git@emile.space>2024-09-19 12:10:10 +0200
committerEmile <git@emile.space>2024-09-19 12:10:10 +0200
commitc2be39da2ca4fca94db9fe54984c2a9615d8d878 (patch)
treed4a0e27355f226adc28d4e268d0d90c5e574c6b8
parent19cc834f33e86af5ff5c79acc5a7346b6ff8ed1b (diff)
git daemon foo
-rw-r--r--nix/hosts/corrino/configuration.nix1
-rw-r--r--nix/hosts/corrino/www/git/cgit.nix12
2 files changed, 11 insertions, 2 deletions
diff --git a/nix/hosts/corrino/configuration.nix b/nix/hosts/corrino/configuration.nix
index 8ef9556..b49688e 100644
--- a/nix/hosts/corrino/configuration.nix
+++ b/nix/hosts/corrino/configuration.nix
@@ -287,6 +287,7 @@ in
         config.emile.ports.gitDaemon # gitDaemon
         80
         443 # normal web
+        config.emile.ports.gitDaemon
       ];
       allowedUDPPorts = [
         51820 # wireguard
diff --git a/nix/hosts/corrino/www/git/cgit.nix b/nix/hosts/corrino/www/git/cgit.nix
index edbbe2f..58df787 100644
--- a/nix/hosts/corrino/www/git/cgit.nix
+++ b/nix/hosts/corrino/www/git/cgit.nix
@@ -569,9 +569,14 @@ in
       '';
     };
 
+    # ssh:// - default port 22
+    # git:// - default port 9418
+    # http:// - default port 80
+    # https:// - default port 443
+
     # exposing stuff
     gitDaemon = {
-      enable = false;
+      enable = true;
 
       user = "git";
       group = "git";
@@ -581,12 +586,15 @@ in
       basePath = "/var/lib/git/repositories";
 
       listenAddress = "git.emile.space";
-      port = config.emile.ports.gitDaemon;
+      port = config.emile.ports.gitDaemon; # 9418
 
       options = "--timeout=30"; # extra Config
     };
   };
 
+  # allow access to the port the gitDaemon is listening on
+  networking.firewall.allowedTCPPorts = [ config.emile.ports.gitDaemon ];
+
   users.extraUsers.nginx.extraGroups = [ "git" ];
 
   # Have to use lib.mkForce below, as the gitolite and gitDaemon user both