2016-05-31 22:13:19 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
krebs.secret.files.mysql_rootPassword = {
|
|
|
|
path = "${config.services.mysql.dataDir}/mysql_rootPassword";
|
2017-10-03 11:43:13 +00:00
|
|
|
owner.name = "mysql";
|
2016-05-31 22:13:19 +00:00
|
|
|
source-path = toString <secrets> + "/mysql_rootPassword";
|
|
|
|
};
|
|
|
|
|
|
|
|
services.mysql = {
|
|
|
|
enable = true;
|
2017-10-03 11:43:13 +00:00
|
|
|
dataDir = "/var/mysql";
|
2016-05-31 22:13:19 +00:00
|
|
|
package = pkgs.mariadb;
|
|
|
|
};
|
|
|
|
|
|
|
|
systemd.services.mysql = {
|
2020-08-04 18:28:04 +00:00
|
|
|
after = [
|
|
|
|
config.krebs.secret.files.mysql_rootPassword.service
|
|
|
|
];
|
2020-08-04 20:22:43 +00:00
|
|
|
partOf = [
|
2020-08-04 18:28:04 +00:00
|
|
|
config.krebs.secret.files.mysql_rootPassword.service
|
|
|
|
];
|
2016-05-31 22:13:19 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
lass.mysqlBackup = {
|
|
|
|
enable = true;
|
2018-12-25 13:29:41 +00:00
|
|
|
config.all = {};
|
2016-05-31 22:13:19 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|