feat: added gitlab pages
This commit is contained in:
parent
39fe45e75a
commit
67661e3431
2 changed files with 50 additions and 4 deletions
|
@ -21,6 +21,7 @@
|
||||||
extraDomainNames = [
|
extraDomainNames = [
|
||||||
"*.skynet.ie"
|
"*.skynet.ie"
|
||||||
"*.minecraft.games.skynet.ie"
|
"*.minecraft.games.skynet.ie"
|
||||||
|
"*.pages.skynet.ie"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -98,6 +98,11 @@
|
||||||
"${cfg.domain.sub} CNAME ${cfg.host.name}"
|
"${cfg.domain.sub} CNAME ${cfg.host.name}"
|
||||||
];
|
];
|
||||||
|
|
||||||
|
skynet_dns.records.external = [
|
||||||
|
# for gitlab pages
|
||||||
|
"*.pages.${cfg.domain.base}.${cfg.domain.tld}. 1800 IN A ${cfg.host.ip}"
|
||||||
|
];
|
||||||
|
|
||||||
networking.firewall.allowedTCPPorts = [
|
networking.firewall.allowedTCPPorts = [
|
||||||
# for git
|
# for git
|
||||||
2222
|
2222
|
||||||
|
@ -105,10 +110,20 @@
|
||||||
|
|
||||||
services.openssh.ports = [ 22 2222 ];
|
services.openssh.ports = [ 22 2222 ];
|
||||||
|
|
||||||
services.nginx.virtualHosts."${cfg.domain.sub}.${cfg.domain.base}.${cfg.domain.tld}" = {
|
services.nginx.virtualHosts = {
|
||||||
forceSSL = true;
|
# main site
|
||||||
useACMEHost = "skynet";
|
"${cfg.domain.sub}.${cfg.domain.base}.${cfg.domain.tld}" = {
|
||||||
locations."/".proxyPass = "http://unix:/run/gitlab/gitlab-workhorse.socket";
|
forceSSL = true;
|
||||||
|
useACMEHost = "skynet";
|
||||||
|
locations."/".proxyPass = "http://unix:/run/gitlab/gitlab-workhorse.socket";
|
||||||
|
};
|
||||||
|
|
||||||
|
# pages
|
||||||
|
"*.pages.${cfg.domain.base}.${cfg.domain.tld}" = {
|
||||||
|
forceSSL = true;
|
||||||
|
useACMEHost = "skynet";
|
||||||
|
locations."/".proxyPass = "http://127.0.0.1:8091";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.gitlab = {
|
services.gitlab = {
|
||||||
|
@ -122,6 +137,30 @@
|
||||||
user = cfg.user;
|
user = cfg.user;
|
||||||
group = cfg.user;
|
group = cfg.user;
|
||||||
databaseUsername = cfg.user;
|
databaseUsername = cfg.user;
|
||||||
|
|
||||||
|
pages = {
|
||||||
|
# TODO: https://docs.gitlab.com/ee/administration/pages/index.html#add-the-domain-to-the-public-suffix-list
|
||||||
|
enable = true;
|
||||||
|
settings = {
|
||||||
|
# these are just examples, not to use
|
||||||
|
#artifacts-server = "http(s)://<services.gitlab.host>/api/v4"
|
||||||
|
#gitlab-server = "http(s)://<services.gitlab.host>"
|
||||||
|
pages-domain = "pages.${cfg.domain.base}.${cfg.domain.tld}";
|
||||||
|
|
||||||
|
listen-http = [
|
||||||
|
"127.0.0.1:8091"
|
||||||
|
];
|
||||||
|
|
||||||
|
/*
|
||||||
|
auth-client-id = "generated-id-xxxxxxx";
|
||||||
|
auth-client-secret = { _secret = "/var/keys/auth-client-secret"; };
|
||||||
|
auth-redirect-uri = "https://projects.example.com/auth";
|
||||||
|
auth-secret = { _secret = "/var/keys/auth-secret"; };
|
||||||
|
auth-server = "https://gitlab.example.com";
|
||||||
|
*/
|
||||||
|
};
|
||||||
|
|
||||||
|
};
|
||||||
#smtp = {
|
#smtp = {
|
||||||
# enable = true;
|
# enable = true;
|
||||||
# address = "localhost";
|
# address = "localhost";
|
||||||
|
@ -164,6 +203,12 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
pages = {
|
||||||
|
# default for pages is set to 8090 but that leaves an "ugly" port in the url,
|
||||||
|
# override it here to make it look good
|
||||||
|
port = 80;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue