summaryrefslogtreecommitdiff
path: root/config/services/git
diff options
context:
space:
mode:
authorquentin@aristote.fr <quentin@aristote.fr>2026-01-24 23:36:57 +0100
committerquentin@aristote.fr <quentin@aristote.fr>2026-01-24 23:36:57 +0100
commit6038c28b11764c95f4716a02b6f37fce9371e1fa (patch)
treeafd93f3bbb720065f3e9448d4b294e73d77affce /config/services/git
parentc3b47e173a8cbb29c934491a2dd17ec3debec129 (diff)
git: enable cgit
Diffstat (limited to 'config/services/git')
-rw-r--r--config/services/git/cgit.nix18
-rw-r--r--config/services/git/default.nix3
2 files changed, 21 insertions, 0 deletions
diff --git a/config/services/git/cgit.nix b/config/services/git/cgit.nix
new file mode 100644
index 0000000..e146671
--- /dev/null
+++ b/config/services/git/cgit.nix
@@ -0,0 +1,18 @@
+{ config, ... }:
+{
+ services.cgit.default = {
+ enable = true;
+ scanPath = "/srv/git";
+ gitHttpBackend.enable = false;
+ nginx = {
+ virtualHost = "${config.networking.hostName}.aristote.mesh";
+ location = "/git/";
+ };
+ extraConfig = ''
+ root-title=repositories
+ root-desc=by Quentin Aristote
+ '';
+ };
+
+ users.users.cgit.extraGroups = [ "git" ];
+}
diff --git a/config/services/git/default.nix b/config/services/git/default.nix
index 65663c1..abed2ae 100644
--- a/config/services/git/default.nix
+++ b/config/services/git/default.nix
@@ -1,10 +1,13 @@
{ config, pkgs, ... }:
{
+ imports = [ ./cgit.nix ];
+
users.users.git = {
isSystemUser = true;
group = "git";
createHome = true;
+ homeMode = "750";
home = "/srv/git";
shell = "${pkgs.git}/bin/git-shell";
openssh.authorizedKeys.keys = with config.personal.lib.publicKeys.ssh; [