Fix gitlab
This commit is contained in:
@@ -28,6 +28,10 @@ in {
|
|||||||
services = {
|
services = {
|
||||||
gitlab = {
|
gitlab = {
|
||||||
enable = cfg.enable;
|
enable = cfg.enable;
|
||||||
|
host = "gitlab.susano-lab.duckdns.org"; # Must be your external domain
|
||||||
|
port = 443; # External port users access
|
||||||
|
https = true; # Enable since external access is HTTPS
|
||||||
|
|
||||||
databasePasswordFile =
|
databasePasswordFile =
|
||||||
config.sops.secrets."gitlab/databasePassword".path;
|
config.sops.secrets."gitlab/databasePassword".path;
|
||||||
initialRootPasswordFile =
|
initialRootPasswordFile =
|
||||||
@@ -45,17 +49,13 @@ in {
|
|||||||
config.sops.secrets."gitlab/activeRecordSalt".path;
|
config.sops.secrets."gitlab/activeRecordSalt".path;
|
||||||
};
|
};
|
||||||
extraConfig = {
|
extraConfig = {
|
||||||
# GitLab-specific configuration
|
# CRITICAL: External URL must match what users type in browser
|
||||||
gitlab = { default_projects_features = { builds = true; }; };
|
external_url = "https://gitlab.susano-lab.duckdns.org";
|
||||||
|
|
||||||
# Configure GitLab to trust our nginx proxy and set external URL
|
|
||||||
gitlab_rails = {
|
gitlab_rails = {
|
||||||
trusted_proxies = [ "127.0.0.1" "::1" ];
|
trusted_proxies = [ "127.0.0.1" "::1" "192.168.1.0/24" ];
|
||||||
# Force GitLab to use the correct external URL for generating links
|
internal_api_url = "https://gitlab.susano-lab.duckdns.org";
|
||||||
gitlab_host = gitlabDomain;
|
|
||||||
gitlab_port = 443;
|
|
||||||
gitlab_https = true;
|
|
||||||
};
|
};
|
||||||
|
nginx.enable = false; # Disable bundled nginx
|
||||||
|
|
||||||
# OmniAuth configuration (direct, not under gitlab_rails)
|
# OmniAuth configuration (direct, not under gitlab_rails)
|
||||||
omniauth = {
|
omniauth = {
|
||||||
|
|||||||
Reference in New Issue
Block a user