nixos

NixOS server files. Mirror from https://git.nordgedanken.dev/kubernetes/nixos
git clone git://archive.git.mtrnord.blog/MTRNord/nixos.git
Log | Files | Refs | README

commit 95ae950b983d560aea187585dbd050b162177b6a
parent c7f6ce4e0ca4823a0d1f5771dc2b1f4c6b8122d4
Author: MTRNord <mtrnord1@gmail.com>
Date:   Sun, 10 Sep 2023 14:28:15 +0200

Fix reload for pgbouncer

Diffstat:
Mnixos/common/lib/confd.nix | 30+++++++++++++++---------------
Mnixos/common/lib/pgbouncer.nix | 2++
2 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/nixos/common/lib/confd.nix b/nixos/common/lib/confd.nix @@ -9,23 +9,23 @@ prefix = "/service/cluster-1"; }; environment.etc = { - "confd/conf.d/pgcat.toml" = { - text = '' - [template] - prefix = "/service/cluster-1" - uid = 985 - gid = 983 - mode = "0644" - src = "pgcat.toml.tmpl" - dest = "/etc/pgcat/pgcat.toml" + # "confd/conf.d/pgcat.toml" = { + # text = '' + # [template] + # prefix = "/service/cluster-1" + # uid = 985 + # gid = 983 + # mode = "0644" + # src = "pgcat.toml.tmpl" + # dest = "/etc/pgcat/pgcat.toml" - reload_cmd = "systemctl reload pgcat" + # reload_cmd = "systemctl reload pgcat" - keys = [ - "/", "/members/","/leader" - ] - ''; - }; + # keys = [ + # "/", "/members/","/leader" + # ] + # ''; + # }; "confd/conf.d/pgbouncer.toml" = { text = '' [template] diff --git a/nixos/common/lib/pgbouncer.nix b/nixos/common/lib/pgbouncer.nix @@ -2,6 +2,7 @@ { environment.systemPackages = with pkgs; [ pgbouncer + util-linux ]; users = { groups.pgbouncer = { }; @@ -24,6 +25,7 @@ serviceConfig = { LimitNOFILE = 8192; ExecStart = "${pkgs.pgbouncer}/bin/pgbouncer /etc/pgbouncer/pgbouncer.ini"; + ExecReload = "${pkgs.util-linux}/bin/kill -s SIGHUP $MAINPID"; Restart = "always"; RestartSec = 5; TimeoutStopSec = 5;