copy nb configuration and modules
This commit is contained in:
37
utils/modules/gogs.nix
Normal file
37
utils/modules/gogs.nix
Normal file
@@ -0,0 +1,37 @@
|
||||
{ config, ... }:
|
||||
|
||||
{
|
||||
services.gogs = {
|
||||
enable = true;
|
||||
domain = "git.cloonar.com";
|
||||
rootUrl = "http://git.cloonar.com/";
|
||||
httpAddress = "git.cloonar.com";
|
||||
httpPort = 3000;
|
||||
extraConfig = ''
|
||||
[server]
|
||||
EXTERNAL_URL = http://git.cloonar.com/
|
||||
[auth]
|
||||
DISABLE_REGISTRATION = true
|
||||
[security]
|
||||
# specific network address, separated by commas, no port needed
|
||||
LOCAL_NETWORK_ALLOWLIST = drone.cloonar.com git-2.cloonar.com
|
||||
'';
|
||||
};
|
||||
|
||||
services.nginx.enable = true;
|
||||
services.nginx.virtualHosts."git.cloonar.com" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
acmeRoot = null;
|
||||
locations."/" = {
|
||||
proxyPass = "http://git.cloonar.com:3000";
|
||||
proxyWebsockets = true;
|
||||
extraConfig =
|
||||
"proxy_connect_timeout 300;" +
|
||||
"proxy_send_timeout 300;" +
|
||||
"proxy_read_timeout 300;" +
|
||||
"send_timeout 300;"
|
||||
;
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user