feat(nix): Configure Gogs setup

This commit is contained in:
Vincent Ambo 2018-01-02 12:08:23 +01:00
parent 9da69a7962
commit a9401f94db
2 changed files with 23 additions and 3 deletions

View file

@ -3,7 +3,7 @@ tazj.in. 21600 IN NS ns-cloud-a1.googledomains.com.
tazj.in. 21600 IN NS ns-cloud-a2.googledomains.com.
tazj.in. 21600 IN NS ns-cloud-a3.googledomains.com.
tazj.in. 21600 IN NS ns-cloud-a4.googledomains.com.
tazj.in. 21600 IN SOA ns-cloud-a1.googledomains.com. cloud-dns-hostmaster.google.com. 104 21600 3600 1209600 300
tazj.in. 21600 IN SOA ns-cloud-a1.googledomains.com. cloud-dns-hostmaster.google.com. 106 21600 3600 1209600 300
;; Email setup
tazj.in. 300 IN MX 10 mx.runbox.com.
@ -18,8 +18,9 @@ www.tazj.in. 3600 IN TXT "keybase-site-verification=ER8m_byyqAhzeIy9TyzkAU1H2p2y
;; Webpage records setup
tazj.in. 60 IN A 46.21.106.241
www.tazj.in. 60 IN A 46.21.106.241
git.tazj.in. 60 IN A 46.21.106.241
files.tazj.in. 300 IN CNAME c.storage.googleapis.com.
git.tazj.in. 60 IN A 104.155.119.229
ip.tazj.in. 300 IN A 104.155.119.229
;; GleSYS machines

View file

@ -9,7 +9,7 @@ tazblog = import ./tazblog { inherit blogSource; };
blog = tazblog.tazblog;
blogConfig = {
enableACME = true;
addSSL = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:8000";
};
@ -38,13 +38,32 @@ in {
wantedBy = [ "multi-user.target" ];
};
# Set up Gogs
services.gogs = {
enable = true;
appName = "Gogs: tazjin's private code";
cookieSecure = true;
domain = "git.tazj.in";
rootUrl = "https://git.tazj.in/";
};
# Set up reverse proxy
services.nginx = {
enable = true;
recommendedTlsSettings = true;
recommendedProxySettings = true;
# Blog!
virtualHosts."tazj.in" = blogConfig;
virtualHosts."www.tazj.in" = blogConfig;
# Git!
virtualHosts."git.tazj.in" = {
enableACME = true;
forceSSL = true;
locations."/" = {
proxyPass = "http://127.0.0.1:3000";
};
};
};
}