From 76296d5cc5f1ddb1108c3f213204bb386353ad93 Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 1 Jun 2016 00:13:19 +0200 Subject: l 2 websites: put sqlBackup in seperate file --- lass/2configs/websites/sqlBackup.nix | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 lass/2configs/websites/sqlBackup.nix (limited to 'lass/2configs/websites/sqlBackup.nix') diff --git a/lass/2configs/websites/sqlBackup.nix b/lass/2configs/websites/sqlBackup.nix new file mode 100644 index 000000000..7cb4b320e --- /dev/null +++ b/lass/2configs/websites/sqlBackup.nix @@ -0,0 +1,28 @@ +{ config, lib, pkgs, ... }: + +{ + krebs.secret.files.mysql_rootPassword = { + path = "${config.services.mysql.dataDir}/mysql_rootPassword"; + owner.name = "root"; + source-path = toString + "/mysql_rootPassword"; + }; + + services.mysql = { + enable = true; + package = pkgs.mariadb; + rootPassword = config.krebs.secret.files.mysql_rootPassword.path; + }; + + systemd.services.mysql = { + requires = [ "secret.service" ]; + after = [ "secret.service" ]; + }; + + lass.mysqlBackup = { + enable = true; + config.all = { + password = toString (); + }; + }; +} + -- cgit v1.2.3