commit cacb854251d84f80a89cce3f56d965345aa177d6
parent 903648cb73ce034c5f3ee8f97eb1fafc59cfbc83
Author: Leah (ctucx) <git@ctu.cx>
Date: Sun, 6 Oct 2024 13:23:49 +0200
parent 903648cb73ce034c5f3ee8f97eb1fafc59cfbc83
Author: Leah (ctucx) <git@ctu.cx>
Date: Sun, 6 Oct 2024 13:23:49 +0200
fcgiwrap: fix config
2 files changed, 20 insertions(+), 9 deletions(-)
diff --git a/machines/briefkasten/router/dnsmasq.nix b/machines/briefkasten/router/dnsmasq.nix @@ -92,7 +92,12 @@ }; }; - fcgiwrap.enable = true; + fcgiwrap.instances.dnsmasq = { + process.user = "dnsmasq"; + process.group = "dnsmasq"; + socket.user = "nginx"; + socket.group = "nginx"; + }; nginx = { enable = true; @@ -103,10 +108,13 @@ locations = { "/".extraConfig = '' include "${pkgs.nginx}/conf/fastcgi_params"; - fastcgi_param SCRIPT_FILENAME "${pkgs.dnsmasq-lease-overview}/bin/overview"; - fastcgi_param LEASE_PATH "/var/lib/dnsmasq/dnsmasq.leases"; - fastcgi_param QUERY_STRING $args; - fastcgi_pass unix:${config.services.fcgiwrap.socketAddress}; + fastcgi_param SCRIPT_FILENAME "${pkgs.dnsmasq-lease-overview}/bin/overview"; + fastcgi_param LEASE_PATH "/var/lib/dnsmasq/dnsmasq.leases"; + fastcgi_param MIKROTIK_HOST "http://10.0.0.2"; + fastcgi_param MIKROTIK_USER "leah"; + fastcgi_param MIKROTIK_PASSWORD "nie5eevaeNohZuyugh2Eo6phaif9ahngiel8oom2aj7cooGohbaiqui9dah4Thie"; + fastcgi_param QUERY_STRING $args; + fastcgi_pass unix:${config.services.fcgiwrap.instances.dnsmasq.socket.address}; ''; }; };
diff --git a/machines/trabbi/git.nix b/machines/trabbi/git.nix @@ -159,9 +159,12 @@ in { }; fcgiwrap = { - enable = true; - user = "git"; - group = "git"; + instances.git = { + process.user = "git"; + process.group = "git"; + socket.user = "nginx"; + socket.group = "nginx"; + }; }; nginx = { @@ -235,7 +238,7 @@ in { fastcgi_param SCRIPT_FILENAME "${pkgs.git}/libexec/git-core/git-http-backend"; fastcgi_param GIT_PROJECT_ROOT /var/lib/gitolite/repositories; fastcgi_param PATH_INFO $uri; - fastcgi_pass unix:${config.services.fcgiwrap.socketAddress}; + fastcgi_pass unix:${config.services.fcgiwrap.instances.git.socket.address}; ''; }; };