Change forgejo user name

This commit is contained in:
Kiana Sheibani 2024-07-22 02:24:47 -04:00
parent 01798f15c3
commit 93de7c23f8

View file

@ -14,6 +14,9 @@ in {
services.forgejo = { services.forgejo = {
enable = true; enable = true;
user = "git";
group = cfg.user;
database.user = cfg.user;
settings = { settings = {
server = { server = {
@ -44,4 +47,15 @@ in {
mirror.DEFAULT_INTERVAL = "1h"; mirror.DEFAULT_INTERVAL = "1h";
}; };
}; };
users.users.${cfg.user} = {
home = cfg.stateDir;
useDefaultShell = true;
group = cfg.group;
isSystemUser = true;
};
users.groups.${cfg.group} = {};
services.openssh.enable = true;
services.openssh.settings.AcceptEnv = "GIT_PROTOCOL";
} }