Add initial forgejo configuration

This commit is contained in:
Eli Ribble 2026-05-08 18:56:50 +00:00
parent 0ee91ff317
commit 083e3e79b7
No known key found for this signature in database
3 changed files with 54 additions and 0 deletions

View file

@ -14,6 +14,7 @@
./element-web.nix
#./fieldseeker-sync.nix
./fish.nix
./forgejo.nix
./label-studio.nix
./librechat.nix
./minio.nix

View file

@ -0,0 +1,52 @@
{ config, lib, pkgs, ... }:
with lib;
let
cfg = config.services.forgejo;
srv = cfg.settings.server;
{
options.myModules.forgejo.enable = mkEnableOption "custom forgejo configuration";
config = mkIf config.myModules.forgejo.enable {
services.forgejo = {
database.type = "postgres";
enable = true;
# Enable support for Git Large File Storage
lfs.enable = true;
settings = {
# Add support for actions, based on act: https://github.com/nektos/act
actions = {
ENABLED = false;
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 = false;
#SMTP_ADDR = "mail.example.com";
#FROM = "noreply@${srv.DOMAIN}";
#USER = "noreply@${srv.DOMAIN}";
#};
server = {
DOMAIN = "source.gleipnir.technology";
# You need to specify this to remove the port from URLs in the web UI.
HTTP_ADDR = "/var/run/forgejo/socket";
PROTOCOL = "http+unix";
ROOT_URL = "https://${srv.DOMAIN}/";
};
# You can temporarily allow registration to create an admin user.
service.DISABLE_REGISTRATION = true;
# Enable ssh user for 'git push'
ssh = {
PORT = 22;
};
};
stateDir = "/mnt/bigdisk/forgejo";
#mailerPasswordFile = config.age.secrets.forgejo-mailer-password.path;
};
systemd.tmpfiles.rules = [
"d /var/run/forgejo 0750 forgejo forgejo - -"
];
};
}

View file

@ -4,6 +4,7 @@
caddy.enable = true;
cloudreve.enable = true;
collabora.enable = true;
forgejo.enable = true;
glitchtip.enable = true;
element-web.enable = true;
label-studio.enable = true;