stockholm/lass/2configs/websites/sqlBackup.nix

31 lines
604 B
Nix
Raw Normal View History

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