aboutsummaryrefslogtreecommitdiff
path: root/nixops/modules/databases
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-03-23 15:35:32 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-03-23 15:35:32 +0100
commit2368a4b7e827b985c3758ad0bfe13e4a08d27c36 (patch)
treeb480c3f232ab29fa947e66f4d5b62568c5459f3e /nixops/modules/databases
parent30a783364abd0afe8399d8f39a251c499451c986 (diff)
downloadNix-2368a4b7e827b985c3758ad0bfe13e4a08d27c36.tar.gz
Nix-2368a4b7e827b985c3758ad0bfe13e4a08d27c36.tar.zst
Nix-2368a4b7e827b985c3758ad0bfe13e4a08d27c36.zip
Migrate packageOverrides to overlays
Diffstat (limited to 'nixops/modules/databases')
-rw-r--r--nixops/modules/databases/mysql.nix8
-rw-r--r--nixops/modules/databases/postgresql.nix10
2 files changed, 9 insertions, 9 deletions
diff --git a/nixops/modules/databases/mysql.nix b/nixops/modules/databases/mysql.nix
index a625d48..635f212 100644
--- a/nixops/modules/databases/mysql.nix
+++ b/nixops/modules/databases/mysql.nix
@@ -14,13 +14,13 @@ in {
14 }; 14 };
15 15
16 config = lib.mkIf cfg.enable { 16 config = lib.mkIf cfg.enable {
17 nixpkgs.config.packageOverrides = oldpkgs: rec { 17 nixpkgs.overlays = [ (self: super: rec {
18 mariadb = mariadbPAM; 18 mariadb = mariadbPAM;
19 mariadbPAM = oldpkgs.mariadb.overrideAttrs(old: rec { 19 mariadbPAM = super.mariadb.overrideAttrs(old: rec {
20 cmakeFlags = old.cmakeFlags ++ [ "-DWITH_AUTHENTICATION_PAM=ON" ]; 20 cmakeFlags = old.cmakeFlags ++ [ "-DWITH_AUTHENTICATION_PAM=ON" ];
21 buildInputs = old.buildInputs ++ [ pkgs.pam ]; 21 buildInputs = old.buildInputs ++ [ self.pam ];
22 }); 22 });
23 }; 23 }) ];
24 24
25 networking.firewall.allowedTCPPorts = [ 3306 ]; 25 networking.firewall.allowedTCPPorts = [ 3306 ];
26 26
diff --git a/nixops/modules/databases/postgresql.nix b/nixops/modules/databases/postgresql.nix
index 2e658f8..f839d63 100644
--- a/nixops/modules/databases/postgresql.nix
+++ b/nixops/modules/databases/postgresql.nix
@@ -14,22 +14,22 @@ in {
14 }; 14 };
15 15
16 config = lib.mkIf cfg.enable { 16 config = lib.mkIf cfg.enable {
17 nixpkgs.config.packageOverrides = oldpkgs: rec { 17 nixpkgs.overlays = [ (self: super: rec {
18 postgresql = postgresql111; 18 postgresql = postgresql111;
19 postgresql111 = oldpkgs.postgresql100.overrideAttrs(old: rec { 19 postgresql111 = super.postgresql100.overrideAttrs(old: rec {
20 passthru = old.passthru // { psqlSchema = "11.0"; }; 20 passthru = old.passthru // { psqlSchema = "11.0"; };
21 name = "postgresql-11.1"; 21 name = "postgresql-11.1";
22 src = pkgs.fetchurl { 22 src = self.fetchurl {
23 url = "mirror://postgresql/source/v11.1/${name}.tar.bz2"; 23 url = "mirror://postgresql/source/v11.1/${name}.tar.bz2";
24 sha256 = "026v0sicsh7avzi45waf8shcbhivyxmi7qgn9fd1x0vl520mx0ch"; 24 sha256 = "026v0sicsh7avzi45waf8shcbhivyxmi7qgn9fd1x0vl520mx0ch";
25 }; 25 };
26 configureFlags = old.configureFlags ++ [ "--with-pam" ]; 26 configureFlags = old.configureFlags ++ [ "--with-pam" ];
27 buildInputs = (old.buildInputs or []) ++ [ pkgs.pam ]; 27 buildInputs = (old.buildInputs or []) ++ [ self.pam ];
28 patches = old.patches ++ [ 28 patches = old.patches ++ [
29 ./postgresql_run_socket_path.patch 29 ./postgresql_run_socket_path.patch
30 ]; 30 ];
31 }); 31 });
32 }; 32 }) ];
33 33
34 networking.firewall.allowedTCPPorts = [ 5432 ]; 34 networking.firewall.allowedTCPPorts = [ 5432 ];
35 35