nixedo: re-add forgejo

This commit is contained in:
Oliver Davies 2025-01-06 12:00:00 +00:00
parent f1f9866816
commit 2006d2b53e
2 changed files with 35 additions and 0 deletions

View file

@ -2,6 +2,7 @@
imports = [ imports = [
./audiobookshelf.nix ./audiobookshelf.nix
./beaverhabits.nix ./beaverhabits.nix
./forgejo.nix
./freshrss.nix ./freshrss.nix
./gitea.nix ./gitea.nix
./immich.nix ./immich.nix

View file

@ -0,0 +1,34 @@
{ config, lib, ... }:
with lib;
{
options.features.homelab.forgejo.enable = mkEnableOption "Enable forgejo";
config = mkIf config.features.homelab.forgejo.enable {
services = {
forgejo = {
enable = true;
group = "media";
stateDir = "/mnt/media/forgejo";
settings = {
server = {
DOMAIN = "forgejo.opdavies.uk";
HTTP_PORT = 2223;
};
service = {
DISABLE_REGISTRATION = true;
};
};
};
caddy.virtualHosts."${config.services.forgejo.settings.server.DOMAIN}" = {
useACMEHost = "opdavies.uk";
extraConfig = "reverse_proxy localhost:${toString config.services.forgejo.settings.server.HTTP_PORT}";
};
};
};
}