35 lines
No EOL
856 B
Nix
35 lines
No EOL
856 B
Nix
{ config, pkgs, lib, enableSSL, ... }:
|
|
|
|
let
|
|
host = "git.elnu.com";
|
|
port = 3000;
|
|
in {
|
|
services.forgejo = {
|
|
package = pkgs.forgejo; # Don't use LTS
|
|
enable = true;
|
|
stateDir = "/mnt/data/forgejo";
|
|
settings = {
|
|
server = {
|
|
HTTP_PORT = port;
|
|
DOMAIN = host;
|
|
SSH_DOMAIN = host;
|
|
# security keys will get messed up if this isn't set exactly
|
|
# will default to http://git.elnu.com:3000/ otherwise
|
|
ROOT_URL = "https://${host}/";
|
|
# make gravatar etc work
|
|
OFFLINE_MODE = false;
|
|
};
|
|
service = {
|
|
DISABLE_REGISTRATION = true;
|
|
};
|
|
};
|
|
};
|
|
services.nginx.virtualHosts."${host}" = {
|
|
forceSSL = enableSSL;
|
|
enableACME = enableSSL;
|
|
default = true;
|
|
locations = {
|
|
"/".proxyPass = "http://localhost:${builtins.toString port}";
|
|
};
|
|
};
|
|
} |