about summary refs log tree commit diff
path: root/colmena/cobalt/services/gitolite.nix
diff options
context:
space:
mode:
Diffstat (limited to 'colmena/cobalt/services/gitolite.nix')
-rw-r--r--colmena/cobalt/services/gitolite.nix23
1 files changed, 23 insertions, 0 deletions
diff --git a/colmena/cobalt/services/gitolite.nix b/colmena/cobalt/services/gitolite.nix
new file mode 100644
index 0000000..55dec6c
--- /dev/null
+++ b/colmena/cobalt/services/gitolite.nix
@@ -0,0 +1,23 @@
+{
+  services.gitolite = {
+    enable = true;
+    user = "git";
+    group = "git";
+    adminPubkey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDi7GGOGVj1Y5Sc1EW6zEdrp78dS6hvmS348pqu9dUsB openpgp:0x6BE7BD6F";
+    extraGitoliteRc = ''
+      $RC{UMASK} = 0027;
+      $RC{GIT_CONFIG_KEYS} = '.*';
+      $RC{ROLES}{OWNERS} = 1;
+      $RC{OWNER_ROLENAME} = 'OWNERS';
+      push(@{$RC{ENABLE}}, 'D');
+      push(@{$RC{ENABLE}}, 'set-default-roles');
+      # push(@{$RC{ENABLE}}, 'create');
+      # push(@{$RC{ENABLE}}, 'fork');
+
+    '';
+  };
+
+  environment.persistence."/persist".directories = [
+    "/var/lib/gitolite"
+  ];
+}