about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNguyễn Gia Phong <mcsinyx@disroot.org>2022-07-21 16:11:22 +0900
committerNguyễn Gia Phong <mcsinyx@disroot.org>2022-07-21 16:11:22 +0900
commitbe878b0fa6cadf02d33e88e1ea4a5f6b44393a76 (patch)
tree8d1ec77522caa8d60dd1298c01b697a018cfd0de
parentbd7babbec6019c2a73bd4b42e6a12593f831f03a (diff)
downloadnixos-conf-be878b0fa6cadf02d33e88e1ea4a5f6b44393a76.tar.gz
Deploy phylactery
-rw-r--r--static.nix24
1 files changed, 21 insertions, 3 deletions
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 <https://www.gnu.org/licenses/>.
 
-{ 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 = [