summaryrefslogtreecommitdiffstats
path: root/lass/2configs/websites/sqlBackup.nix
blob: 10a6e4643aaeed676e425e4f0ebf4d5577f426b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
{ 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 = {
    requires = [ "secret.service" ];
    after = [ "secret.service" ];
  };

  lass.mysqlBackup = {
    enable = true;
    config.all = {};
  };
}