From be878b0fa6cadf02d33e88e1ea4a5f6b44393a76 Mon Sep 17 00:00:00 2001 From: Nguyễn Gia Phong Date: Thu, 21 Jul 2022 16:11:22 +0900 Subject: Deploy phylactery --- static.nix | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'static.nix') diff --git a/static.nix b/static.nix index 1a44bd6..5a7ad07 100644 --- a/static.nix +++ b/static.nix @@ -16,7 +16,7 @@ # You should have received a copy of the GNU Affero General Public License # along with loang configuration. If not, see . -{ config, lib, pkgs, ... }: +{ config, lib, ... }: let certs = config.security.acme.certs.${domain}; domain = config.networking.domain; @@ -27,6 +27,7 @@ let options = [ "bind" ]; }; }) sources; + phylactery = config.services.phylactery; in { fileSystems = bindUserDirs { cnx = "www"; @@ -67,13 +68,30 @@ in { root = "/var/lib/www/${domain}"; }; - "owocean.${domain}" = { + "xem.${domain}" = let + address = "http://${phylactery.host}:${toString phylactery.port}"; + in { enableACME = true; forceSSL = true; - root = "/var/lib/www/owocean.${domain}"; + locations."/".proxyPass = address; + }; + + "septagram.suricrasia.online" = { + enableACME = true; + extraConfig = '' + autoindex on; + ''; + forceSSL = true; + root = "/var/lib/www/septagram.suricrasia.online"; }; }; }; + + phylactery = { + enable = true; + library = "/mnt/nas/comix"; + port = 42069; + }; }; systemd.services.molly-brown.serviceConfig.SupplementaryGroups = [ -- cgit 1.4.1