diff options
author | EuAndreh <eu@euandre.org> | 2021-06-07 21:03:01 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-06-07 21:03:01 -0300 |
commit | ed2ef5bb3f84e469e1eb04054ac468e9b9fd9130 (patch) | |
tree | b08c364781169e99d00ed65c3afbd1a6d5aa3c59 /servers/nixvps/configuration.nix | |
parent | servers/vps/machines.scm: Cleanup email configuration for now (diff) | |
download | toph-ed2ef5bb3f84e469e1eb04054ac468e9b9fd9130.tar.gz toph-ed2ef5bb3f84e469e1eb04054ac468e9b9fd9130.tar.xz |
servers/nixvps/configuration.nix: Use subfolders of the same domain over subdomains
Diffstat (limited to 'servers/nixvps/configuration.nix')
-rw-r--r-- | servers/nixvps/configuration.nix | 55 |
1 files changed, 18 insertions, 37 deletions
diff --git a/servers/nixvps/configuration.nix b/servers/nixvps/configuration.nix index e55ba3a..14b36f9 100644 --- a/servers/nixvps/configuration.nix +++ b/servers/nixvps/configuration.nix @@ -7,28 +7,6 @@ let TLD = envsubstConfiguration.TLD; cgitPort = "81"; openSSHPort = 23841; - docs-projects = [ - "boneco" - "pdfs-da-d-maria" - - "package-repository" - "servers" - - "remembering" - "autoqemu" - "fallible" - "sharedc" - "mediator" - "gluilo" - "gistatic" - ]; - }; - site-for-project = project-name: { - "${project-name}.${config.TLD}" = { - forceSSL = true; - enableACME = true; - root = "/srv/http/${project-name}/"; - }; }; in { imports = [ ./hardware-configuration.nix ]; @@ -106,22 +84,25 @@ in { recommendedOptimisation = true; recommendedProxySettings = true; recommendedTlsSettings = true; - virtualHosts = - pkgs.lib.fold (project: acc: acc // site-for-project project) { } - config.docs-projects // { - "git.${config.TLD}" = { - forceSSL = true; - enableACME = true; - extraConfig = '' - location = /favicon.ico { - alias ${pkgs.cgit}/cgit/favicon.ico; - } - location / { - proxy_pass http://localhost:${config.cgitPort}; - } - ''; - }; + virtualHosts = { + "${config.TLD}" = { + forceSSL = true; + enableACME = true; + root = "/srv/http/"; }; + "git.${config.TLD}" = { + forceSSL = true; + enableACME = true; + extraConfig = '' + location = /favicon.ico { + alias ${pkgs.cgit}/cgit/favicon.ico; + } + location / { + proxy_pass http://localhost:${config.cgitPort}; + } + ''; + }; + }; }; lighttpd = { |