aboutsummaryrefslogtreecommitdiff
path: root/nixops/modules/databases
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2019-03-25 23:30:18 +0100
committerIsmaël Bouya <ismael.bouya@normalesup.org>2019-03-26 08:53:18 +0100
commit587b9e340bb5cb14ca55e62a0498295e702b56c5 (patch)
tree10d7488dffc394905b2321726c1eda0a6f2640b9 /nixops/modules/databases
parentcaa08508100ce2307a4c64ff047241572ff85b45 (diff)
downloadNix-587b9e340bb5cb14ca55e62a0498295e702b56c5.tar.gz
Nix-587b9e340bb5cb14ca55e62a0498295e702b56c5.tar.zst
Nix-587b9e340bb5cb14ca55e62a0498295e702b56c5.zip
Upgrade to latest nixpkgs
Diffstat (limited to 'nixops/modules/databases')
-rw-r--r--nixops/modules/databases/mysql.nix3
-rw-r--r--nixops/modules/databases/postgresql.nix33
2 files changed, 10 insertions, 26 deletions
diff --git a/nixops/modules/databases/mysql.nix b/nixops/modules/databases/mysql.nix
index 39d25d3..635f212 100644
--- a/nixops/modules/databases/mysql.nix
+++ b/nixops/modules/databases/mysql.nix
@@ -1,6 +1,5 @@
1{ lib, pkgs, pkgsNext, config, myconfig, mylibs, ... }: 1{ lib, pkgs, config, myconfig, mylibs, ... }:
2let 2let
3 pkgs = pkgsNext.appendOverlays config.nixpkgs.overlays;
4 cfg = config.services.myDatabases; 3 cfg = config.services.myDatabases;
5in { 4in {
6 options.services.myDatabases = { 5 options.services.myDatabases = {
diff --git a/nixops/modules/databases/postgresql.nix b/nixops/modules/databases/postgresql.nix
index 7046b45..673ced8 100644
--- a/nixops/modules/databases/postgresql.nix
+++ b/nixops/modules/databases/postgresql.nix
@@ -1,6 +1,5 @@
1{ lib, pkgs, pkgsNext, config, myconfig, mylibs, ... }: 1{ lib, pkgs, config, myconfig, mylibs, ... }:
2let 2let
3 pkgs = pkgsNext.appendOverlays config.nixpkgs.overlays;
4 cfg = config.services.myDatabases; 3 cfg = config.services.myDatabases;
5in { 4in {
6 options.services.myDatabases = { 5 options.services.myDatabases = {
@@ -17,28 +16,14 @@ in {
17 config = lib.mkIf cfg.enable { 16 config = lib.mkIf cfg.enable {
18 nixpkgs.overlays = [ (self: super: rec { 17 nixpkgs.overlays = [ (self: super: rec {
19 postgresql = postgresql_11; 18 postgresql = postgresql_11;
20 postgresql_11 = if builtins.hasAttr "postgresql_11" super 19 postgresql_11 = super.postgresql_11.overrideAttrs(old: rec {
21 then super.postgresql_11.overrideAttrs(old: rec { 20 passthru = old.passthru // { psqlSchema = "11.0"; };
22 passthru = old.passthru // { psqlSchema = "11.0"; }; 21 configureFlags = old.configureFlags ++ [ "--with-pam" ];
23 configureFlags = old.configureFlags ++ [ "--with-pam" ]; 22 buildInputs = (old.buildInputs or []) ++ [ self.pam ];
24 buildInputs = (old.buildInputs or []) ++ [ self.pam ]; 23 patches = old.patches ++ [
25 patches = old.patches ++ [ 24 ./postgresql_run_socket_path.patch
26 ./postgresql_run_socket_path.patch 25 ];
27 ]; 26 });
28 })
29 else super.postgresql100.overrideAttrs(old: rec {
30 passthru = old.passthru // { psqlSchema = "11.0"; };
31 name = "postgresql-11.1";
32 src = self.fetchurl {
33 url = "mirror://postgresql/source/v11.1/${name}.tar.bz2";
34 sha256 = "026v0sicsh7avzi45waf8shcbhivyxmi7qgn9fd1x0vl520mx0ch";
35 };
36 configureFlags = old.configureFlags ++ [ "--with-pam" ];
37 buildInputs = (old.buildInputs or []) ++ [ self.pam ];
38 patches = old.patches ++ [
39 ./postgresql_run_socket_path.patch
40 ];
41 });
42 }) ]; 27 }) ];
43 28
44 networking.firewall.allowedTCPPorts = [ 5432 ]; 29 networking.firewall.allowedTCPPorts = [ 5432 ];