mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-11 15:27:20 +03:00
Merge pull request #5006 from daogames/este/customgitoliteuser
enable different useraccount name for gitolite user
This commit is contained in:
commit
04d62f6643
@ -46,11 +46,19 @@ in
|
||||
A list of custom git hooks that get copied to <literal>~/.gitolite/hooks/common</literal>.
|
||||
'';
|
||||
};
|
||||
|
||||
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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user