l 2 websites: put sqlBackup in seperate file
This commit is contained in:
parent
18e602dc70
commit
76296d5cc5
|
@ -22,49 +22,30 @@ let
|
|||
|
||||
in {
|
||||
imports = [
|
||||
( ssl [ "reich-gebaeudereinigung.de" ])
|
||||
( servePage [ "reich-gebaeudereinigung.de" ])
|
||||
./sqlBackup.nix
|
||||
(ssl [ "reich-gebaeudereinigung.de" ])
|
||||
(servePage [ "reich-gebaeudereinigung.de" ])
|
||||
|
||||
( manageCerts [ "karlaskop.de" ])
|
||||
( servePage [ "karlaskop.de" ])
|
||||
(ssl [ "karlaskop.de" ])
|
||||
(servePage [ "karlaskop.de" ])
|
||||
|
||||
( ssl [ "makeup.apanowicz.de" ])
|
||||
( servePage [ "makeup.apanowicz.de" ])
|
||||
(ssl [ "makeup.apanowicz.de" ])
|
||||
(servePage [ "makeup.apanowicz.de" ])
|
||||
|
||||
( manageCerts [ "pixelpocket.de" ])
|
||||
( servePage [ "pixelpocket.de" ])
|
||||
(ssl [ "pixelpocket.de" ])
|
||||
(servePage [ "pixelpocket.de" ])
|
||||
|
||||
( ssl [ "o.ubikmedia.de" ])
|
||||
( serveOwncloud [ "o.ubikmedia.de" ])
|
||||
(ssl [ "o.ubikmedia.de" ])
|
||||
(serveOwncloud [ "o.ubikmedia.de" ])
|
||||
|
||||
( ssl [ "ubikmedia.de" "aldona.ubikmedia.de" "apanowicz.de" "nirwanabluete.de" "aldonasiech.com" "360gradvideo.tv" "ubikmedia.eu" ] )
|
||||
( serveWordpress [ "ubikmedia.de" "*.ubikmedia.de" "apanowicz.de" "nirwanabluete.de" "aldonasiech.com" "360gradvideo.tv" "ubikmedia.eu" ] )
|
||||
(ssl [ "ubikmedia.de" "aldona.ubikmedia.de" "apanowicz.de" "nirwanabluete.de" "aldonasiech.com" "360gradvideo.tv" "ubikmedia.eu" ])
|
||||
(serveWordpress [ "ubikmedia.de" "*.ubikmedia.de" "apanowicz.de" "nirwanabluete.de" "aldonasiech.com" "360gradvideo.tv" "ubikmedia.eu" ])
|
||||
];
|
||||
|
||||
services.mysql = {
|
||||
enable = true;
|
||||
package = pkgs.mariadb;
|
||||
rootPassword = toString (<secrets/mysql_rootPassword>);
|
||||
};
|
||||
|
||||
lass.mysqlBackup = {
|
||||
enable = true;
|
||||
config.domsen = {
|
||||
password = toString (<secrets/mysql_rootPassword>);
|
||||
databases = [
|
||||
"ubikmedia_de"
|
||||
"o_ubikmedia_de"
|
||||
];
|
||||
};
|
||||
};
|
||||
services.mysqlBackup = {
|
||||
enable = true;
|
||||
databases = [
|
||||
"ubikmedia_de"
|
||||
"o_ubikmedia_de"
|
||||
];
|
||||
location = "/bku/sql_dumps";
|
||||
};
|
||||
lass.mysqlBackup.config.all.databases = [
|
||||
"ubikmedia_de"
|
||||
"o_ubikmedia_de"
|
||||
];
|
||||
|
||||
users.users.domsen = {
|
||||
uid = genid "domsen";
|
||||
|
|
|
@ -14,50 +14,40 @@ let
|
|||
|
||||
in {
|
||||
imports = [
|
||||
( ssl [ "biostase.de" "www.biostase.de" ])
|
||||
( serveWordpress [ "biostase.de" "www.biostase.de" ])
|
||||
./sqlBackup.nix
|
||||
(ssl [ "biostase.de" "www.biostase.de" ])
|
||||
(serveWordpress [ "biostase.de" "www.biostase.de" ])
|
||||
|
||||
( ssl [ "radical-dreamers.de" "www.radical-dreamers.de" ])
|
||||
( serveWordpress [ "radical-dreamers.de" "www.radical-dreamers.de" ])
|
||||
(ssl [ "radical-dreamers.de" "www.radical-dreamers.de" ])
|
||||
(serveWordpress [ "radical-dreamers.de" "www.radical-dreamers.de" ])
|
||||
|
||||
( ssl [ "gs-maubach.de" "www.gs-maubach.de" ])
|
||||
( serveWordpress [ "gs-maubach.de" "www.gs-maubach.de" ])
|
||||
(ssl [ "gs-maubach.de" "www.gs-maubach.de" ])
|
||||
(serveWordpress [ "gs-maubach.de" "www.gs-maubach.de" ])
|
||||
|
||||
( ssl [ "spielwaren-kern.de" "www.spielwaren-kern.de" ])
|
||||
( serveWordpress [ "spielwaren-kern.de" "www.spielwaren-kern.de" ])
|
||||
(ssl [ "spielwaren-kern.de" "www.spielwaren-kern.de" ])
|
||||
(serveWordpress [ "spielwaren-kern.de" "www.spielwaren-kern.de" ])
|
||||
|
||||
( ssl [ "familienpraxis-korntal.de" "www.familienpraxis-korntal.de" ])
|
||||
( servePage [ "familienpraxis-korntal.de" "www.familienpraxis-korntal.de" ])
|
||||
(ssl [ "familienpraxis-korntal.de" "www.familienpraxis-korntal.de" ])
|
||||
(servePage [ "familienpraxis-korntal.de" "www.familienpraxis-korntal.de" ])
|
||||
|
||||
( ssl [ "ttf-kleinaspach.de" "www.ttf-kleinaspach.de" ])
|
||||
( serveWordpress [ "ttf-kleinaspach.de" "www.ttf-kleinaspach.de" ])
|
||||
(ssl [ "ttf-kleinaspach.de" "www.ttf-kleinaspach.de" ])
|
||||
(serveWordpress [ "ttf-kleinaspach.de" "www.ttf-kleinaspach.de" ])
|
||||
|
||||
( ssl [ "eastuttgart.de" "www.eastuttgart.de" ])
|
||||
( serveWordpress [ "eastuttgart.de" "www.eastuttgart.de" ])
|
||||
(ssl [ "eastuttgart.de" "www.eastuttgart.de" ])
|
||||
(serveWordpress [ "eastuttgart.de" "www.eastuttgart.de" ])
|
||||
|
||||
#( ssl [ "www.habsys.de" "habsys.de" "www.habsys.eu" "habsys.eu" ])
|
||||
( servePage [ "www.habsys.de" "habsys.de" "www.habsys.eu" "habsys.eu" ])
|
||||
(ssl [ "habsys.de" "www.habsys.de" "habsys.eu" "www.habsys.eu" ])
|
||||
(servePage [ "habsys.de" "www.habsys.de" "habsys.eu" "www.habsys.eu" ])
|
||||
];
|
||||
|
||||
services.mysql = {
|
||||
enable = true;
|
||||
package = pkgs.mariadb;
|
||||
rootPassword = toString (<secrets/mysql_rootPassword>);
|
||||
};
|
||||
lass.mysqlBackup.config.all.databases = [
|
||||
"biostase_de"
|
||||
"eastuttgart_de"
|
||||
"radical_dreamers_de"
|
||||
"spielwaren_kern_de"
|
||||
"ttf_kleinaspach_de"
|
||||
];
|
||||
|
||||
lass.mysqlBackup = {
|
||||
enable = true;
|
||||
config.fritz = {
|
||||
password = toString (<secrets/mysql_rootPassword>);
|
||||
databases = [
|
||||
"biostase_de"
|
||||
"eastuttgart_de"
|
||||
"radical_dreamers_de"
|
||||
"spielwaren_kern_de"
|
||||
"ttf_kleinaspach_de"
|
||||
];
|
||||
};
|
||||
};
|
||||
users.users.root.openssh.authorizedKeys.keys = [
|
||||
config.krebs.users.fritz.pubkey
|
||||
];
|
||||
|
|
28
lass/2configs/websites/sqlBackup.nix
Normal file
28
lass/2configs/websites/sqlBackup.nix
Normal file
|
@ -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 <secrets> + "/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 (<secrets/mysql_rootPassword>);
|
||||
};
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in a new issue