@cryptotaxi247 / infra / commits / ccbda59f

zrepl: fix authentication for checkpointing

Martin Weinelt committed Jul 16, 2026 at 13:56 UTC ccbda59f0b9c1ff5a4085499b4f32d97d4551c87
2 files changed +8 -1
build/mimas/postgresql.nix
+5
@@ -95,6 +95,11 @@
95
96 authentication = lib.mkBefore ''
97 local all postgres-exporter peer
98 + local hydra zrepl peer map=zrepl
99 + '';
100 +
101 + identMap = ''
102 + zrepl root zrepl
103 '';
104 };
105 }
build/mimas/zrepl.nix
+3 -1
@@ -37,8 +37,10 @@ in
37 hooks = [
38 {
39 # https://zrepl.github.io/configuration/snapshotting.html#postgres-checkpoint-hook
40 + # CREATE ROLE zrepl LOGIN;
41 + # GRANT pg_checkpoint TO zrepl;
42 type = "postgres-checkpoint";
41 - dsn = "host=/run/postgresql dbname=hydra user=postgres sslmode=disable";
43 + dsn = "host=/run/postgresql dbname=hydra user=zrepl sslmode=disable";
44 filesystems."zroot/pg" = true;
45 }
46 ];