From 486161b78e45e94a6f314b65bb05080605f0cd01 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 23 Aug 2023 21:22:46 +0200 Subject: [PATCH] checks/patroni: use our postgresql --- packages/checks/default.nix | 1 + packages/checks/patroni.nix | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/packages/checks/default.nix b/packages/checks/default.nix index d47413c..02b9853 100644 --- a/packages/checks/default.nix +++ b/packages/checks/default.nix @@ -9,6 +9,7 @@ patroni = pkgs.callPackage ./patroni.nix { inherit (self) nixosModules; + inherit (self'.packages) postgresql; }; searxng = pkgs.callPackage ./searxng.nix { inherit (self'.packages) searxng; diff --git a/packages/checks/patroni.nix b/packages/checks/patroni.nix index 00905aa..bd29fd7 100644 --- a/packages/checks/patroni.nix +++ b/packages/checks/patroni.nix @@ -1,4 +1,4 @@ -{ nixosTest, nixosModules }: +{ nixosTest, nixosModules, postgresql }: # taken from https://github.com/phfroidmont/nixpkgs/blob/patroni-module/nixos/tests/patroni.nix nixosTest ( @@ -31,7 +31,7 @@ nixosTest ( enable = true; - postgresqlPackage = pkgs.postgresql_14.withPackages (p: [ p.pg_safeupdate ]); + postgresqlPackage = postgresql.withPackages (p: [ p.pg_safeupdate ]); scope = "cluster1"; name = "node${toString(index + 1)}"; @@ -119,7 +119,7 @@ nixosTest ( }; client = { pkgs, ... }: { - environment.systemPackages = [ pkgs.postgresql_14 ]; + environment.systemPackages = [ postgresql ]; networking.interfaces.eth1.ipv4.addresses = pkgs.lib.mkOverride 0 [ { address = "192.168.2.1"; prefixLength = 16; }