sourcehut: use StateDirectory
[sourcephile-nix.git] / hosts / losurdo / nginx.nix
index 1aeefa5e2d834c3885abdc289954928608b46acd..8743c9b33eafa3149206259f90787c873681ad4f 100644 (file)
@@ -1,4 +1,4 @@
-{ pkgs, lib, config, ... }:
+{ pkgs, lib, config, hostName, ... }:
 let
   inherit (config) networking;
   inherit (config.services) nginx;
@@ -14,6 +14,10 @@ networking.nftables.ruleset = ''
   add rule inet filter net2fw tcp dport 80 counter accept comment "HTTP"
   add rule inet filter net2fw tcp dport 443 counter accept comment "HTTPS"
 '';
+fileSystems."/var/lib/nginx" = {
+  device = "${hostName}/var/www";
+  fsType = "zfs";
+};
 services.upnpc.redirections = [
   { description = "HTTP"; externalPort =  80; protocol = "TCP"; duration = 30 * 60;
     service.wantedBy = ["nginx.service"];