From 2b243bfbad88be9c079a139ceda83a87ea7abc7b Mon Sep 17 00:00:00 2001 From: Ronny Esterluss Date: Fri, 14 Nov 2014 16:07:17 +0100 Subject: [PATCH] enable different useraccount name for gitolite user --- nixos/modules/services/misc/gitolite.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/nixos/modules/services/misc/gitolite.nix b/nixos/modules/services/misc/gitolite.nix index 462b68aa0a1..66e19d13d72 100644 --- a/nixos/modules/services/misc/gitolite.nix +++ b/nixos/modules/services/misc/gitolite.nix @@ -46,11 +46,19 @@ in A list of custom git hooks that get copied to ~/.gitolite/hooks/common. ''; }; + + user = mkOption { + type = types.str; + default = "gitolite"; + description = '' + Gitolite user account. This is the username of the gitolite endpoint. + ''; + }; }; }; config = mkIf cfg.enable { - users.extraUsers.gitolite = { + users.extraUsers.${cfg.user} = { description = "Gitolite user"; home = cfg.dataDir; createHome = true; @@ -62,7 +70,7 @@ in description = "Gitolite initialization"; wantedBy = [ "multi-user.target" ]; - serviceConfig.User = "gitolite"; + serviceConfig.User = "${cfg.user}"; serviceConfig.Type = "oneshot"; serviceConfig.RemainAfterExit = true;