From 629657670d7d5cdda433416fa29772332ed76fc0 Mon Sep 17 00:00:00 2001 From: 6543 <6543@obermui.de> Date: Thu, 9 Apr 2026 19:38:45 +0200 Subject: [PATCH] nixos/services.mysql: remove legacy logic as old mysql version packages where droped --- nixos/modules/services/databases/mysql.nix | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/nixos/modules/services/databases/mysql.nix b/nixos/modules/services/databases/mysql.nix index 73f8644b2d36..4a196efc7758 100644 --- a/nixos/modules/services/databases/mysql.nix +++ b/nixos/modules/services/databases/mysql.nix @@ -9,9 +9,6 @@ let cfg = config.services.mysql; isMariaDB = lib.getName cfg.package == lib.getName pkgs.mariadb; - isOracle = lib.getName cfg.package == lib.getName pkgs.mysql84; - # Oracle MySQL has supported "notify" service type since 8.0 - hasNotify = isMariaDB || (isOracle && lib.versionAtLeast cfg.package.version "8.0"); mysqldOptions = "--user=${cfg.user} --datadir=${cfg.dataDir} --basedir=${cfg.package}"; @@ -576,15 +573,6 @@ in superUser = if isMariaDB then cfg.user else "root"; in '' - ${lib.optionalString (!hasNotify) '' - # Wait until the MySQL server is available for use - while [ ! -e /run/mysqld/mysqld.sock ] - do - echo "MySQL daemon not yet started. Waiting for 1 second..." - sleep 1 - done - ''} - ${lib.optionalString isMariaDB '' # If MariaDB is used in an Galera cluster, we have to check if the sync is done, # or it will fail to init the database while joining, so we get in an broken non recoverable state @@ -689,7 +677,7 @@ in serviceConfig = lib.mkMerge [ { - Type = if hasNotify then "notify" else "simple"; + Type = "notify"; Restart = "on-abnormal"; RestartSec = "5s";