aboutsummaryrefslogtreecommitdiff
path: root/nixops/modules/databases
diff options
context:
space:
mode:
Diffstat (limited to 'nixops/modules/databases')
-rw-r--r--nixops/modules/databases/mysql.nix8
-rw-r--r--nixops/modules/databases/postgresql.nix12
-rw-r--r--nixops/modules/databases/postgresql_run_socket_path.patch12
3 files changed, 0 insertions, 32 deletions
diff --git a/nixops/modules/databases/mysql.nix b/nixops/modules/databases/mysql.nix
index a9ca8d3..2d56155 100644
--- a/nixops/modules/databases/mysql.nix
+++ b/nixops/modules/databases/mysql.nix
@@ -14,14 +14,6 @@ in {
14 }; 14 };
15 15
16 config = lib.mkIf cfg.enable { 16 config = lib.mkIf cfg.enable {
17 nixpkgs.overlays = [ (self: super: rec {
18 mariadb = mariadbPAM;
19 mariadbPAM = super.mariadb.overrideAttrs(old: rec {
20 cmakeFlags = old.cmakeFlags ++ [ "-DWITH_AUTHENTICATION_PAM=ON" ];
21 buildInputs = old.buildInputs ++ [ self.pam ];
22 });
23 }) ];
24
25 networking.firewall.allowedTCPPorts = [ 3306 ]; 17 networking.firewall.allowedTCPPorts = [ 3306 ];
26 18
27 # for adminer, ssl is implemented with mysqli only, which is 19 # for adminer, ssl is implemented with mysqli only, which is
diff --git a/nixops/modules/databases/postgresql.nix b/nixops/modules/databases/postgresql.nix
index 62e9e34..0afce70 100644
--- a/nixops/modules/databases/postgresql.nix
+++ b/nixops/modules/databases/postgresql.nix
@@ -14,18 +14,6 @@ in {
14 }; 14 };
15 15
16 config = lib.mkIf cfg.enable { 16 config = lib.mkIf cfg.enable {
17 nixpkgs.overlays = [ (self: super: rec {
18 postgresql = postgresql_11;
19 postgresql_11 = super.postgresql_11.overrideAttrs(old: rec {
20 passthru = old.passthru // { psqlSchema = "11.0"; };
21 configureFlags = old.configureFlags ++ [ "--with-pam" ];
22 buildInputs = (old.buildInputs or []) ++ [ self.pam ];
23 patches = old.patches ++ [
24 ./postgresql_run_socket_path.patch
25 ];
26 });
27 }) ];
28
29 networking.firewall.allowedTCPPorts = [ 5432 ]; 17 networking.firewall.allowedTCPPorts = [ 5432 ];
30 18
31 security.acme.certs."postgresql" = config.services.myCertificates.certConfig // { 19 security.acme.certs."postgresql" = config.services.myCertificates.certConfig // {
diff --git a/nixops/modules/databases/postgresql_run_socket_path.patch b/nixops/modules/databases/postgresql_run_socket_path.patch
deleted file mode 100644
index b558c7b..0000000
--- a/nixops/modules/databases/postgresql_run_socket_path.patch
+++ /dev/null
@@ -1,12 +0,0 @@
1diff -Naur postgresql-9.2.0.sockets/src/include/pg_config_manual.h postgresql-9.2.0/src/include/pg_config_manual.h
2--- postgresql-9.2.0.sockets/src/include/pg_config_manual.h 2012-09-06 17:26:17.000000000 -0400
3+++ postgresql-9.2.0/src/include/pg_config_manual.h 2012-09-06 18:13:18.183092471 -0400
4@@ -144,7 +144,7 @@
5 * here's where to twiddle it. You can also override this at runtime
6 * with the postmaster's -k switch.
7 */
8-#define DEFAULT_PGSOCKET_DIR "/tmp"
9+#define DEFAULT_PGSOCKET_DIR "/run/postgresql"
10
11 /*
12 * The random() function is expected to yield values between 0 and