2022-12-27 10:10:53 -05:00
|
|
|
{ config, ... }:
|
2021-10-13 21:11:36 -04:00
|
|
|
|
|
|
|
let cfg = config.services.gitea;
|
2022-05-06 20:01:04 -04:00
|
|
|
in
|
|
|
|
{
|
2021-10-13 21:11:36 -04:00
|
|
|
users.users.git = {
|
|
|
|
description = "Gitea Service";
|
|
|
|
home = cfg.stateDir;
|
|
|
|
useDefaultShell = true;
|
|
|
|
group = "git";
|
|
|
|
isSystemUser = true;
|
|
|
|
};
|
|
|
|
users.groups.git = { };
|
|
|
|
|
2022-06-04 12:53:24 -04:00
|
|
|
services = {
|
|
|
|
gitea = {
|
|
|
|
enable = true;
|
|
|
|
user = "git";
|
|
|
|
appName = "walkah forge";
|
|
|
|
lfs.enable = true;
|
2021-10-13 21:11:36 -04:00
|
|
|
|
2022-06-04 12:53:24 -04:00
|
|
|
settings = {
|
2023-04-27 11:05:10 -04:00
|
|
|
log = { LEVEL = "Error"; };
|
|
|
|
other = { SHOW_FOOTER_VERSION = false; };
|
|
|
|
repository = { DEFAULT_BRANCH = "main"; };
|
|
|
|
server = {
|
|
|
|
DOMAIN = "walkah.dev";
|
|
|
|
HTTP_ADDR = "0.0.0.0";
|
|
|
|
HTTP_PORT = 8003;
|
|
|
|
ROOT_URL = "https://walkah.dev/";
|
|
|
|
SSH_DOMAIN = "git.walkah.dev";
|
|
|
|
};
|
|
|
|
service = { DISABLE_REGISTRATION = true; };
|
|
|
|
session = { COOKIE_SECURE = true; };
|
2022-06-04 12:53:24 -04:00
|
|
|
};
|
2021-10-13 21:11:36 -04:00
|
|
|
|
2022-06-04 12:53:24 -04:00
|
|
|
dump.enable = false;
|
2021-10-13 21:11:36 -04:00
|
|
|
|
2022-06-04 12:53:24 -04:00
|
|
|
database = {
|
|
|
|
type = "postgres";
|
|
|
|
user = "git";
|
|
|
|
};
|
2021-10-13 21:11:36 -04:00
|
|
|
};
|
2022-06-04 12:53:24 -04:00
|
|
|
postgresqlBackup.databases = [ "gitea" ];
|
2021-10-13 21:11:36 -04:00
|
|
|
};
|
|
|
|
}
|