diff options
author | Oliver Matthews <oliver@codersoffortune.net> | 2015-04-14 12:34:26 +0000 |
---|---|---|
committer | Oliver Matthews <oliver@codersoffortune.net> | 2015-04-15 14:35:38 +0000 |
commit | 0144849f678f9ff611c2a2f1538a455bb8ebdf69 (patch) | |
tree | 027a828a12f26742b3d96dcec306fa03fc278f3d /nixos/modules | |
parent | 869b86d925a9e2e592e0a6385908faa186eace77 (diff) | |
download | nixlib-0144849f678f9ff611c2a2f1538a455bb8ebdf69.tar nixlib-0144849f678f9ff611c2a2f1538a455bb8ebdf69.tar.gz nixlib-0144849f678f9ff611c2a2f1538a455bb8ebdf69.tar.bz2 nixlib-0144849f678f9ff611c2a2f1538a455bb8ebdf69.tar.lz nixlib-0144849f678f9ff611c2a2f1538a455bb8ebdf69.tar.xz nixlib-0144849f678f9ff611c2a2f1538a455bb8ebdf69.tar.zst nixlib-0144849f678f9ff611c2a2f1538a455bb8ebdf69.zip |
Allow allowing local access to mysql socket
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/services/databases/mysql.nix | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/nixos/modules/services/databases/mysql.nix b/nixos/modules/services/databases/mysql.nix index 05b13492052a..30d7a77c58b8 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 0700 -p /run/mysqld + mkdir -p /run/mysqld + chmod ${if cfg.enableSocketAccess then "0755" else "0700"} /run/mysqld chown -R ${cfg.user} /run/mysqld ''; |