From c2be39da2ca4fca94db9fe54984c2a9615d8d878 Mon Sep 17 00:00:00 2001 From: Emile Date: Thu, 19 Sep 2024 12:10:10 +0200 Subject: git daemon foo --- nix/hosts/corrino/configuration.nix | 1 + nix/hosts/corrino/www/git/cgit.nix | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) (limited to 'nix') 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 -- cgit 1.4.1