Move to Forgejo
This commit is contained in:
parent
1ffd3cf5e9
commit
36e33dd5cb
|
@ -21,11 +21,11 @@
|
|||
# Services
|
||||
./services/openssh.nix
|
||||
./server/acme.nix
|
||||
./server/adguard.nix
|
||||
./server/ddclient.nix
|
||||
./server/icecast.nix
|
||||
./server/firewall.nix
|
||||
./server/gitea.nix
|
||||
./server/forgejo.nix
|
||||
./server/mailserver.nix
|
||||
./server/mariadb.nix
|
||||
./server/nginx.nix
|
||||
|
|
40
nixos/server/forgejo.nix
Normal file
40
nixos/server/forgejo.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
# This is a hard fork of Gitea.
|
||||
{outputs, ...}: {
|
||||
services = {
|
||||
forgejo = {
|
||||
enable = true;
|
||||
settings = {
|
||||
server = {
|
||||
DOMAIN = "git.${outputs.secrets.jimDomain}";
|
||||
ROOT_URL = "https://git.${outputs.secrets.jimDomain}:443";
|
||||
HTTP_PORT = 3110;
|
||||
SSH_PORT = 2299;
|
||||
START_SSH_SERVER = true;
|
||||
};
|
||||
mailer = {
|
||||
ENABLED = true;
|
||||
SMTP_ADDR = "mx.${outputs.secrets.jimDomain}";
|
||||
FROM = "Jimbo's Git <noreply@${outputs.secrets.jimDomain}>";
|
||||
USER = "noreply@${outputs.secrets.jimDomain}";
|
||||
PASSWD = outputs.secrets.noreplyPassword;
|
||||
PROTOCOL = "smtps";
|
||||
};
|
||||
service = {
|
||||
REGISTER_EMAIL_CONFIRM = true;
|
||||
#DISABLE_REGISTRATION = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
nginx.virtualHosts."git.${outputs.secrets.jimDomain}" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:3110";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Allow Forgejo's SSH to work
|
||||
networking.firewall.allowedTCPPorts = [ 2299 ];
|
||||
}
|
|
@ -4,10 +4,10 @@
|
|||
enable = true;
|
||||
settings = {
|
||||
server = {
|
||||
DOMAIN = "git.${outputs.secrets.jimDomain}";
|
||||
ROOT_URL = "https://git.${outputs.secrets.jimDomain}:443";
|
||||
HTTP_PORT = 3110;
|
||||
SSH_PORT = 2299;
|
||||
DOMAIN = "gitea.${outputs.secrets.jimDomain}";
|
||||
ROOT_URL = "https://gitea.${outputs.secrets.jimDomain}:443";
|
||||
HTTP_PORT = 3115;
|
||||
SSH_PORT = 2295;
|
||||
START_SSH_SERVER = true;
|
||||
};
|
||||
mailer = {
|
||||
|
@ -21,16 +21,16 @@
|
|||
service.REGISTER_EMAIL_CONFIRM = true;
|
||||
};
|
||||
};
|
||||
nginx.virtualHosts."git.${outputs.secrets.jimDomain}" = {
|
||||
nginx.virtualHosts."gitea.${outputs.secrets.jimDomain}" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:3110";
|
||||
proxyPass = "http://127.0.0.1:3115";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Allow Gitea SSH to work
|
||||
networking.firewall.allowedTCPPorts = [ 2299 ];
|
||||
networking.firewall.allowedTCPPorts = [ 2295 ];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue