katzen-cafe/modules/forgejo.nix

66 lines
1.5 KiB
Nix
Raw Normal View History

2023-05-03 14:38:40 +02:00
{
2024-01-25 10:05:55 +01:00
pkgs,
pkgsUnstable,
...
}: {
users.users.gitea = {
home = "/var/lib/gitea";
useDefaultShell = true;
group = "gitea";
isSystemUser = true;
};
users.groups.gitea = {};
services.forgejo = {
2023-05-03 14:38:40 +02:00
enable = true;
package = pkgsUnstable.forgejo;
repositoryRoot = "/forgejo/repos";
2024-01-25 10:05:55 +01:00
stateDir = "/var/lib/gitea";
2023-05-03 14:38:40 +02:00
appName = "Katzenschmiede";
2024-01-25 10:05:55 +01:00
user = "gitea";
group = "gitea";
2023-05-03 14:38:40 +02:00
database = {
type = "postgres";
2024-01-25 10:05:55 +01:00
name = "gitea";
user = "gitea";
2023-05-03 14:38:40 +02:00
};
settings = {
openid = {
ENABLE_OPENID_SIGNIN = true;
2023-05-03 21:32:39 +02:00
};
federation = {
ENABLED = true;
2023-05-03 14:38:40 +02:00
};
2023-07-30 16:24:46 +02:00
server = {
ROOT_URL = "https://forge.katzen.cafe/";
HTTP_PORT = 8082;
DOMAIN = "forge.katzen.cafe";
START_SSH_SERVER = true;
SSH_PORT = 2222;
2023-07-30 16:24:46 +02:00
};
2023-05-03 21:32:39 +02:00
service = {
REGISTER_MANUAL_CONFIRM = true;
SHOW_REGISTRATION_BUTTON = false;
};
2023-05-06 03:19:19 +02:00
actions = {
ENABLED = true;
};
2023-07-30 16:24:46 +02:00
mailer = {
ENABLED = true;
2023-08-05 18:46:25 +02:00
FROM = "noreply@katzen.cafe";
PROTOCOL = "smtps";
2023-07-30 16:24:46 +02:00
SMTP_ADDR = "mail.katzen.cafe";
SMTP_PORT = 465;
2023-08-05 18:46:25 +02:00
USER = "noreply@katzen.cafe";
2023-07-30 16:24:46 +02:00
};
2023-05-03 14:38:40 +02:00
};
2023-08-05 18:46:25 +02:00
mailerPasswordFile = "/var/lib/secrets/noreply-mail-pw-plain";
2023-05-03 14:38:40 +02:00
};
deployment.keys = {
2023-08-05 18:46:25 +02:00
"noreply-mail-pw-plain" = {
2024-01-25 10:05:55 +01:00
keyCommand = ["pass" "mailpws/plain/noreply"];
2023-08-05 18:46:25 +02:00
destDir = "/var/lib/secrets";
2023-07-30 16:24:46 +02:00
permissions = "0604";
};
2023-05-03 14:38:40 +02:00
};
}