fmt
This commit is contained in:
parent
4aa0ac2a7f
commit
ac2780eb5b
1 changed files with 36 additions and 29 deletions
|
|
@ -133,7 +133,11 @@ in {
|
|||
dump = site.backup.database;
|
||||
paths = builtins.concatLists [
|
||||
site.backup.paths
|
||||
(if dump != null then [ "/var/backup/${key}.sql" ] else [])
|
||||
(
|
||||
if dump != null
|
||||
then ["/var/backup/${key}.sql"]
|
||||
else []
|
||||
)
|
||||
];
|
||||
preHook = lib.mkIf (dump != null) ''
|
||||
mkdir -p /var/backup
|
||||
|
|
@ -144,7 +148,9 @@ in {
|
|||
'';
|
||||
in
|
||||
if site.backup.enable
|
||||
then acc // {
|
||||
then
|
||||
acc
|
||||
// {
|
||||
"${key}" = {
|
||||
repo = backup_cfg.borgRepository + "/./${key}";
|
||||
environment = {
|
||||
|
|
@ -165,7 +171,8 @@ in {
|
|||
inherit preHook;
|
||||
inherit postHook;
|
||||
};
|
||||
} else acc) {} (builtins.attrNames cfg);
|
||||
}
|
||||
else acc) {} (builtins.attrNames cfg);
|
||||
|
||||
systemd.tmpfiles.settings = {
|
||||
"99-borgdatabasebackups"."/var/backup/postgres".d = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue