about summary refs log tree commit diff
path: root/modules/services/gerrit
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-05-26 19:38:21 -0700
committerFranck Cuny <franck@fcuny.net>2022-05-26 19:38:21 -0700
commit0fdbb402b56e027e67a1a5627975844626fc1d9d (patch)
tree88c4f4ed7d37abc3593ed7d78de60b756dd5b2ff /modules/services/gerrit
parentfeat(home/git): add credential configuration for cl.fcuny.net (diff)
downloadworld-0fdbb402b56e027e67a1a5627975844626fc1d9d.tar.gz
ref(gerrit): ensure the git user is present
Change-Id: Ie217a14a20474b626a2c66116663b785193978c2
Diffstat (limited to 'modules/services/gerrit')
-rw-r--r--modules/services/gerrit/default.nix9
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/services/gerrit/default.nix b/modules/services/gerrit/default.nix
index ab35533..a113894 100644
--- a/modules/services/gerrit/default.nix
+++ b/modules/services/gerrit/default.nix
@@ -17,6 +17,15 @@ in {
   };
 
   config = lib.mkIf cfg.enable {
+    users.users.git = {
+      description = "git";
+      home = cfg.stateDir;
+      useDefaultShell = true;
+      group = "git";
+      isSystemUser = true;
+    };
+    users.groups.git = { };
+
     services.gerrit = {
       enable = true;
       listenAddress = "[::]:4778";