2022-12-27 10:10:53 -05:00
|
|
|
{ config, ... }:
|
2021-10-13 21:11:36 -04:00
|
|
|
|
2024-12-07 20:46:15 -05: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 = {
|
2024-12-07 20:46:15 -05:00
|
|
|
log = {
|
|
|
|
LEVEL = "Error";
|
|
|
|
};
|
|
|
|
other = {
|
|
|
|
SHOW_FOOTER_VERSION = false;
|
|
|
|
};
|
|
|
|
repository = {
|
|
|
|
DEFAULT_BRANCH = "main";
|
|
|
|
};
|
2023-04-27 11:05:10 -04:00
|
|
|
server = {
|
|
|
|
DOMAIN = "walkah.dev";
|
|
|
|
HTTP_ADDR = "0.0.0.0";
|
|
|
|
HTTP_PORT = 8003;
|
|
|
|
ROOT_URL = "https://walkah.dev/";
|
|
|
|
SSH_DOMAIN = "git.walkah.dev";
|
|
|
|
};
|
2024-12-07 20:46:15 -05:00
|
|
|
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 = {
|
2023-11-27 12:14:54 -05:00
|
|
|
createDatabase = false;
|
2022-06-04 12:53:24 -04:00
|
|
|
type = "postgres";
|
2023-11-27 12:14:54 -05:00
|
|
|
name = "gitea";
|
|
|
|
socket = "/run/postgresql";
|
2022-06-04 12:53:24 -04:00
|
|
|
user = "git";
|
|
|
|
};
|
2021-10-13 21:11:36 -04:00
|
|
|
};
|
2023-11-27 12:14:54 -05:00
|
|
|
postgresql = {
|
|
|
|
ensureDatabases = [ "gitea" ];
|
|
|
|
ensureUsers = [
|
|
|
|
{
|
|
|
|
name = "git";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2022-06-04 12:53:24 -04:00
|
|
|
postgresqlBackup.databases = [ "gitea" ];
|
2021-10-13 21:11:36 -04:00
|
|
|
};
|
|
|
|
}
|