]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/monitoring/default.nix
Add syden peertube website
[perso/Immae/Config/Nix.git] / modules / private / monitoring / default.nix
index d23e9c5e572969611dc6f5e1041dd02622498681..0586567ec326034bb11d61f5f61d5e05c092780e 100644 (file)
@@ -11,6 +11,11 @@ let
       pkgs.mailutils
     ]}
     '';
+  postgresqlBinary = if config.myServices.databasesReplication.postgresql.enable
+    then config.myServices.databasesReplication.postgresql.mainPackage
+    else if config.myServices.databases.enable
+    then config.myServices.databases.postgresql.package
+    else pkgs.postgresql;
   myplugins = pkgs.runCommand "buildplugins" {
     buildInputs = [ pkgs.makeWrapper pkgs.perl ];
   } ''
@@ -28,7 +33,7 @@ let
       pkgs.gnugrep pkgs.gawk pkgs.procps-ng
     ]}
     wrapProgram $out/check_postgres_replication --prefix PATH : ${lib.makeBinPath [
-      pkgs.postgresql
+      postgresqlBinary
     ]}
     wrapProgram $out/check_redis_replication --prefix PATH : ${lib.makeBinPath [
       pkgs.gnugrep pkgs.coreutils pkgs.redis
@@ -122,7 +127,7 @@ let
     };
   otherObjects = map
     (n: (pkgs.callPackage (./. + "/objects_" + n + ".nix") { inherit emailCheck; }))
-    [ "caldance-1" "ulminfo-fr" "immae-eu" "phare" "tiboqorl-fr" ];
+    [ "caldance-1" "ulminfo-fr" "phare" "tiboqorl-fr" ];
   masterObjects = pkgs.callPackage ./objects_master.nix { inherit config; };
   commonObjects = pkgs.callPackage ./objects_common.nix ({
     master = cfg.master;