Initial commit from system

This commit is contained in:
LorenzProbst 2026-06-15 19:03:52 +02:00
parent 5754649a1b
commit 9cae73f501
5 changed files with 366 additions and 0 deletions

48
forgejo/forgejo.nix Normal file
View file

@ -0,0 +1,48 @@
{ 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";
# };
}