add gitea
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
./ente.nix
|
||||
./fileshelter.nix
|
||||
./games
|
||||
./gitea.nix
|
||||
./github-runner.nix
|
||||
./gitolite.nix
|
||||
./kavita.nix
|
||||
|
||||
41
modules/services/gitea.nix
Normal file
41
modules/services/gitea.nix
Normal file
@@ -0,0 +1,41 @@
|
||||
{
|
||||
config,
|
||||
pkgs,
|
||||
lib,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
let
|
||||
cfg = config.custom.services.gitea;
|
||||
in
|
||||
{
|
||||
options.custom.services.gitea = {
|
||||
enable = lib.mkEnableOption "Enables gitea";
|
||||
fqdn = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
default = "git.kopatz.dev";
|
||||
description = "FQDN under which gitea is available";
|
||||
};
|
||||
};
|
||||
config = lib.mkIf cfg.enable {
|
||||
# Initial setup requires
|
||||
services.gitea = {
|
||||
enable = true;
|
||||
stateDir = "/1tbssd/gitea";
|
||||
settings = {
|
||||
server.HTTP_PORT = 3001;
|
||||
service.DISABLE_REGISTRATION = true;
|
||||
server.DOMAIN = cfg.fqdn;
|
||||
server.ROOT_URL = "https://${cfg.fqdn}";
|
||||
server.DISABLE_SSH = true;
|
||||
};
|
||||
};
|
||||
services.nginx.virtualHosts."${cfg.fqdn}" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
quic = true;
|
||||
http3 = true;
|
||||
locations."/".proxyPass = "http://localhost:3001";
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user