I think my flake needs a complete rewrite
This commit is contained in:
parent
87fbcda3d3
commit
65f90a0bf3
65 changed files with 110 additions and 125 deletions
39
modules/system/services/server/forgejo/default.nix
Normal file
39
modules/system/services/server/forgejo/default.nix
Normal file
|
@ -0,0 +1,39 @@
|
|||
{ outputs, ... }:
|
||||
{
|
||||
imports = [
|
||||
./nginx
|
||||
];
|
||||
|
||||
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;
|
||||
};
|
||||
ui = {
|
||||
DEFAULT_THEME = "forgejo-dark";
|
||||
};
|
||||
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;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
# Allow Forgejo's SSH to work
|
||||
networking.firewall.allowedTCPPorts = [ 2299 ];
|
||||
}
|
11
modules/system/services/server/forgejo/nginx/default.nix
Normal file
11
modules/system/services/server/forgejo/nginx/default.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{ outputs, ... }:
|
||||
{
|
||||
services.nginx.virtualHosts."git.${outputs.secrets.jimDomain}" = {
|
||||
enableACME = true;
|
||||
forceSSL = true;
|
||||
locations."/" = {
|
||||
proxyPass = "http://127.0.0.1:3110";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue