Add forgejo, potentially to replace Gitea

This commit is contained in:
Oliver Davies 2024-12-19 18:00:00 +00:00
parent 815c9ece0e
commit c50f54fb2c
3 changed files with 38 additions and 0 deletions

View file

@ -12,6 +12,7 @@
}; };
homelab = { homelab = {
forgejo.enable = true;
gitea.enable = true; gitea.enable = true;
immich.enable = true; immich.enable = true;
jellyfin.enable = true; jellyfin.enable = true;

View file

@ -1,6 +1,7 @@
{ {
imports = [ imports = [
./audiobookshelf.nix ./audiobookshelf.nix
./forgejo.nix
./gitea.nix ./gitea.nix
./immich.nix ./immich.nix
./jellyfin.nix ./jellyfin.nix

View file

@ -0,0 +1,36 @@
{ config, lib, ... }:
with lib;
let
port = 2223;
in
{
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 = {
HTTP_PORT = port;
};
service = {
DISABLE_REGISTRATION = true;
};
};
};
nginx = {
enable = true;
virtualHosts."forgejo.davies.home".locations."/".proxyPass = "http://localhost:${toString port}/";
};
};
};
}