From 07fc32c2bda830acf882a4402056d2d64dfe0dd5 Mon Sep 17 00:00:00 2001 From: aftix Date: Fri, 17 May 2024 13:34:37 -0500 Subject: [PATCH] Fixed fermi configuration for deployment --- host/opt/www/znc.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/host/opt/www/znc.nix b/host/opt/www/znc.nix index 48ea154..7f17252 100644 --- a/host/opt/www/znc.nix +++ b/host/opt/www/znc.nix @@ -35,22 +35,25 @@ in { }; systemd = { + tmpfiles.rules = [ + "d ${cfg.dataDir} 0750 ${cfg.user} ${cfg.group} -" + "d ${cfg.dataDir}/configs 0750 ${cfg.user} ${cfg.group} -" + ]; + services = { znc-init = { description = "Initialize znc settings"; + requires = ["local-fs.target"]; + after = ["local-fs.target"]; serviceConfig = { Type = "oneshot"; RemainAfterExit = true; User = cfg.user; Group = cfg.group; - RuntimeDirectory = cfg.dataDir; - RuntimeDirectoryMode = "750"; NoNewPrivileges = true; ProtectSystem = "strict"; ReadWritePaths = cfg.dataDir; ProtectHome = true; - StateDirectory = cfg.dataDir; - StateDirectoryMode = "755"; PrivateTmp = true; ProtectHostname = true; ProtectClock = true; @@ -97,7 +100,7 @@ in { locations = { "/" = { - proxyPass = "http://[[::1]]:7001/"; + proxyPass = "http://[::1]:7001/"; extraConfig = '' proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;