diff --git a/nixos/modules/services/databases/mysql.nix b/nixos/modules/services/databases/mysql.nix index 1cdecedfc772..efc52e917b00 100644 --- a/nixos/modules/services/databases/mysql.nix +++ b/nixos/modules/services/databases/mysql.nix @@ -167,6 +167,12 @@ in unitConfig.RequiresMountsFor = "${cfg.dataDir}"; + path = [ + # Needed for the mysql_install_db command in the preStart script + # which calls the hostname command. + pkgs.nettools + ]; + preStart = '' if ! test -e ${cfg.dataDir}/mysql; then