···7 cfg = config.services.mysql;
89 isMariaDB = lib.getName cfg.package == lib.getName pkgs.mariadb;
0001011 mysqldOptions =
12 "--user=${cfg.user} --datadir=${cfg.dataDir} --basedir=${cfg.package}";
···377 # The super user account to use on *first* run of MySQL server
378 superUser = if isMariaDB then cfg.user else "root";
379 in ''
380- ${optionalString (!isMariaDB) ''
381 # Wait until the MySQL server is available for use
382- count=0
383 while [ ! -e /run/mysqld/mysqld.sock ]
384 do
385- if [ $count -eq 30 ]
386- then
387- echo "Tried 30 times, giving up..."
388- exit 1
389- fi
390-391 echo "MySQL daemon not yet started. Waiting for 1 second..."
392- count=$((count++))
393 sleep 1
394 done
395 ''}
···477478 serviceConfig = mkMerge [
479 {
480- Type = if isMariaDB then "notify" else "simple";
481 Restart = "on-abort";
482 RestartSec = "5s";
483
···7 cfg = config.services.mysql;
89 isMariaDB = lib.getName cfg.package == lib.getName pkgs.mariadb;
10+ isOracle = lib.getName cfg.package == lib.getName pkgs.mysql80;
11+ # Oracle MySQL has supported "notify" service type since 8.0
12+ hasNotify = isMariaDB || (isOracle && versionAtLeast cfg.package.version "8.0");
1314 mysqldOptions =
15 "--user=${cfg.user} --datadir=${cfg.dataDir} --basedir=${cfg.package}";
···380 # The super user account to use on *first* run of MySQL server
381 superUser = if isMariaDB then cfg.user else "root";
382 in ''
383+ ${optionalString (!hasNotify) ''
384 # Wait until the MySQL server is available for use
0385 while [ ! -e /run/mysqld/mysqld.sock ]
386 do
000000387 echo "MySQL daemon not yet started. Waiting for 1 second..."
0388 sleep 1
389 done
390 ''}
···472473 serviceConfig = mkMerge [
474 {
475+ Type = if hasNotify then "notify" else "simple";
476 Restart = "on-abort";
477 RestartSec = "5s";
478
···30# It is likely we will have to split out additional builders for additional
31# versions in the future, or customize this one further.
32{ lib
033, makeWrapper
34, socat
35, iptables
···183184 src = k3sRepo;
185 vendorHash = k3sVendorHash;
0000000000186187 nativeBuildInputs = [ pkg-config ];
188 buildInputs = [ libseccomp sqlite.dev ];
···30# It is likely we will have to split out additional builders for additional
31# versions in the future, or customize this one further.
32{ lib
33+, fetchpatch
34, makeWrapper
35, socat
36, iptables
···184185 src = k3sRepo;
186 vendorHash = k3sVendorHash;
187+188+ patches =
189+ # Disable: Add runtime checking of golang version
190+ lib.optional (lib.versionAtLeast k3sVersion "1.28")
191+ (fetchpatch {
192+ # https://github.com/k3s-io/k3s/pull/9054
193+ url = "https://github.com/k3s-io/k3s/commit/b297996b9252b02e56e9425f55f6becbf6bb7832.patch";
194+ hash = "sha256-xBOY2jnLhT9dtVKtq26V9QUnuX1q6E/9UcO9IaU719U=";
195+ revert = true;
196+ });
197198 nativeBuildInputs = [ pkg-config ];
199 buildInputs = [ libseccomp sqlite.dev ];