Skip to content

Commit

Permalink
Fixed fermi configuration for deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
aftix committed May 17, 2024
1 parent 1cece6e commit 07fc32c
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions host/opt/www/znc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 07fc32c

Please sign in to comment.