48 lines
1.5 KiB
Nix
48 lines
1.5 KiB
Nix
{ lib, pkgs, config, ...}:
|
|
|
|
{
|
|
services.forgejo = {
|
|
enable = true;
|
|
database = {
|
|
createDatabase = true;
|
|
type = "mysql";
|
|
#passwordFile = "/etc/secrets/forgejo/forgejo-db.txt";
|
|
};
|
|
# Enable support for Git Large File Storage
|
|
lfs.enable = true;
|
|
settings = {
|
|
server = {
|
|
DOMAIN = "git.${config.networking.domain}";
|
|
# You need to specify this to remove the port from URLs in the web UI.
|
|
ROOT_URL = "https://${config.services.forgejo.settings.server.DOMAIN}";
|
|
HTTP_PORT = 3100;
|
|
};
|
|
# You can temporarily allow registration to create an admin user.
|
|
service.DISABLE_REGISTRATION = false;
|
|
session.COOKIE_SECURE = true;
|
|
# Add support for actions, based on act: https://github.com/nektos/act
|
|
# actions = {
|
|
# ENABLED = true;
|
|
# DEFAULT_ACTIONS_URL = "github";
|
|
# };
|
|
# Sending emails is completely optional
|
|
# You can send a test email from the web UI at:
|
|
# Profile Picture > Site Administration > Configuration > Mailer Configuration
|
|
# mailer = {
|
|
# ENABLED = true;
|
|
# SMTP_ADDR = "mail.example.com";
|
|
# FROM = "noreply@${srv.DOMAIN}";
|
|
# USER = "noreply@${srv.DOMAIN}";
|
|
# };
|
|
};
|
|
# secrets = {
|
|
# mailer.PASSWD = config.age.secrets.forgejo-mailer-password.path;
|
|
# };
|
|
};
|
|
|
|
# age.secrets.forgejo-mailer-password = {
|
|
# file = ../secrets/forgejo-mailer-password.age;
|
|
# mode = "400";
|
|
# owner = "forgejo";
|
|
# };
|
|
}
|