summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorRob Vermaas <rob.vermaas@gmail.com>2015-06-10 08:31:12 +0000
committerRob Vermaas <rob.vermaas@gmail.com>2015-06-10 08:31:12 +0000
commit42323dc15544d549454a7229747ffb268b83b7dd (patch)
tree6faec2d0b37f47167e1d0ab6a6d0b79fc52c9a96 /nixos
parentbc4be1909918b1d962f488788091eb5dbc3fadb3 (diff)
parent0144849f678f9ff611c2a2f1538a455bb8ebdf69 (diff)
downloadnixlib-42323dc15544d549454a7229747ffb268b83b7dd.tar
nixlib-42323dc15544d549454a7229747ffb268b83b7dd.tar.gz
nixlib-42323dc15544d549454a7229747ffb268b83b7dd.tar.bz2
nixlib-42323dc15544d549454a7229747ffb268b83b7dd.tar.lz
nixlib-42323dc15544d549454a7229747ffb268b83b7dd.tar.xz
nixlib-42323dc15544d549454a7229747ffb268b83b7dd.tar.zst
nixlib-42323dc15544d549454a7229747ffb268b83b7dd.zip
Merge cwoac:mysql_socket
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/databases/mysql.nix11
1 files changed, 10 insertions, 1 deletions
diff --git a/nixos/modules/services/databases/mysql.nix b/nixos/modules/services/databases/mysql.nix
index b5919047cc11..fec238b8645a 100644
--- a/nixos/modules/services/databases/mysql.nix
+++ b/nixos/modules/services/databases/mysql.nix
@@ -77,6 +77,14 @@ in
         description = "Location of the file which stores the PID of the MySQL server";
       };
 
+      enableSocketAccess = mkOption {
+        type = types.bool;
+        default = true;
+        description = ''
+          Whether to grant local processes access to the mysqld socket.
+        '';
+      };
+
       extraOptions = mkOption {
         default = "";
         example = ''
@@ -180,7 +188,8 @@ in
             chown -R ${cfg.user} ${cfg.pidDir}
 
             # Make the socket directory
-            mkdir -m 0755 -p /run/mysqld
+            mkdir -p /run/mysqld
+            chmod 0755 /run/mysqld
             chown -R ${cfg.user} /run/mysqld
           '';