From 851f25966e419564e2288c6dc675d0954da7e8cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Thu, 2 May 2019 02:43:40 +0200 Subject: Adapt postgresql overlay Many packages depend on postgresql but are not tied to custom version --- nixops/modules/databases/postgresql.nix | 4 ++++ overlays/databases/mysql/default.nix | 5 +++++ overlays/databases/postgresql/default.nix | 3 +-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/nixops/modules/databases/postgresql.nix b/nixops/modules/databases/postgresql.nix index 0afce70..b113e9f 100644 --- a/nixops/modules/databases/postgresql.nix +++ b/nixops/modules/databases/postgresql.nix @@ -14,6 +14,10 @@ in { }; config = lib.mkIf cfg.enable { + nixpkgs.overlays = [ (self: super: rec { + postgresql = self.postgresql_11_custom; + }) ]; + networking.firewall.allowedTCPPorts = [ 5432 ]; security.acme.certs."postgresql" = config.services.myCertificates.certConfig // { diff --git a/overlays/databases/mysql/default.nix b/overlays/databases/mysql/default.nix index 24bad1b..5e40284 100644 --- a/overlays/databases/mysql/default.nix +++ b/overlays/databases/mysql/default.nix @@ -3,5 +3,10 @@ self: super: rec { mariadbPAM = super.mariadb.overrideAttrs(old: { cmakeFlags = old.cmakeFlags ++ [ "-DWITH_AUTHENTICATION_PAM=ON" ]; buildInputs = old.buildInputs ++ [ self.pam ]; + }) // (with super.mariadb; { + inherit client; + servier = super.mariadb; + inherit connector-c; + inherit galera; }); } diff --git a/overlays/databases/postgresql/default.nix b/overlays/databases/postgresql/default.nix index 8dec7ff..8d1405e 100644 --- a/overlays/databases/postgresql/default.nix +++ b/overlays/databases/postgresql/default.nix @@ -1,6 +1,5 @@ self: super: rec { - postgresql = postgresql_11; - postgresql_11 = super.postgresql_11.overrideAttrs(old: { + postgresql_11_custom = super.postgresql_11.overrideAttrs(old: { # datadir in /var/lib/postgresql is named after psqlSchema passthru = old.passthru // { psqlSchema = "11.0"; }; configureFlags = old.configureFlags ++ [ "--with-pam" ]; -- cgit v1.2.3