fix(forgejo): fix possible duplicate user creation
This commit is contained in:
parent
f7e030244b
commit
5b602799f6
1 changed files with 2 additions and 2 deletions
|
|
@ -46,7 +46,7 @@ in {
|
||||||
++ lib.optional (!(builtins.isNull cfg.templates))
|
++ lib.optional (!(builtins.isNull cfg.templates))
|
||||||
"L+ ${forgejo.stateDir}/custom/templates - - - - ${cfg.templates}";
|
"L+ ${forgejo.stateDir}/custom/templates - - - - ${cfg.templates}";
|
||||||
|
|
||||||
users.users = lib.mkIf cfg.createUser {
|
users.users = lib.mkIf (cfg.createUser && forgejo.user != "forgejo") {
|
||||||
${forgejo.user} = {
|
${forgejo.user} = {
|
||||||
home = forgejo.stateDir;
|
home = forgejo.stateDir;
|
||||||
useDefaultShell = true;
|
useDefaultShell = true;
|
||||||
|
|
@ -54,7 +54,7 @@ in {
|
||||||
isSystemUser = true;
|
isSystemUser = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
users.groups = lib.mkIf cfg.createUser {
|
users.groups = lib.mkIf (cfg.createUser && forgejo.group != "forgejo") {
|
||||||
${forgejo.group} = {};
|
${forgejo.group} = {};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue