nixedo: re-add forgejo
This commit is contained in:
parent
f1f9866816
commit
2006d2b53e
|
@ -2,6 +2,7 @@
|
|||
imports = [
|
||||
./audiobookshelf.nix
|
||||
./beaverhabits.nix
|
||||
./forgejo.nix
|
||||
./freshrss.nix
|
||||
./gitea.nix
|
||||
./immich.nix
|
||||
|
|
34
nix/modules/nixos/features/homelab/forgejo.nix
Normal file
34
nix/modules/nixos/features/homelab/forgejo.nix
Normal 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}";
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue