diff options
author | Robin Gloster <mail@glob.in> | 2017-12-28 14:06:03 +0100 |
---|---|---|
committer | Robin Gloster <mail@glob.in> | 2017-12-29 02:18:35 +0100 |
commit | 86c7db0ac448123b0adee5fb89db501d294e9168 (patch) | |
tree | 67e72a77d4fe05bf45b0579f1d297591e1aa8c46 /nixos/modules/services/databases/mysql.nix | |
parent | 88657b3a50f2bdc4cfa9cc2a629b1382def08228 (diff) | |
download | nixpkgs-86c7db0ac448123b0adee5fb89db501d294e9168.tar nixpkgs-86c7db0ac448123b0adee5fb89db501d294e9168.tar.gz nixpkgs-86c7db0ac448123b0adee5fb89db501d294e9168.tar.bz2 nixpkgs-86c7db0ac448123b0adee5fb89db501d294e9168.tar.lz nixpkgs-86c7db0ac448123b0adee5fb89db501d294e9168.tar.xz nixpkgs-86c7db0ac448123b0adee5fb89db501d294e9168.tar.zst nixpkgs-86c7db0ac448123b0adee5fb89db501d294e9168.zip |
mysql module: cleanup obsolete checks
Diffstat (limited to 'nixos/modules/services/databases/mysql.nix')
-rw-r--r-- | nixos/modules/services/databases/mysql.nix | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/nixos/modules/services/databases/mysql.nix b/nixos/modules/services/databases/mysql.nix index a3bf4f9ba92..36d5340a306 100644 --- a/nixos/modules/services/databases/mysql.nix +++ b/nixos/modules/services/databases/mysql.nix @@ -7,14 +7,12 @@ let cfg = config.services.mysql; mysql = cfg.package; - - isMariaDB = + + isMariaDB = let pName = _p: (builtins.parseDrvName (_p.name)).name; in pName mysql == pName pkgs.mariadb; - atLeast55 = versionAtLeast mysql.mysqlVersion "5.5"; - pidFile = "${cfg.pidDir}/mysqld.pid"; mysqldOptions = @@ -28,13 +26,6 @@ let ${optionalString (cfg.bind != null) "bind-address = ${cfg.bind}" } ${optionalString (cfg.replication.role == "master" || cfg.replication.role == "slave") "log-bin=mysql-bin"} ${optionalString (cfg.replication.role == "master" || cfg.replication.role == "slave") "server-id = ${toString cfg.replication.serverId}"} - ${optionalString (cfg.replication.role == "slave" && !atLeast55) - '' - master-host = ${cfg.replication.masterHost} - master-user = ${cfg.replication.masterUser} - master-password = ${cfg.replication.masterPassword} - master-port = ${toString cfg.replication.masterPort} - ''} ${optionalString (cfg.ensureUsers != []) '' plugin-load-add = auth_socket.so @@ -315,7 +306,7 @@ in fi '') cfg.initialDatabases} - ${optionalString (cfg.replication.role == "master" && atLeast55) + ${optionalString (cfg.replication.role == "master") '' # Set up the replication master @@ -326,7 +317,7 @@ in ) | ${mysql}/bin/mysql -u root -N ''} - ${optionalString (cfg.replication.role == "slave" && atLeast55) + ${optionalString (cfg.replication.role == "slave") '' # Set up the replication slave |