fix mismatched types issue
This commit is contained in:
parent
7a633b5236
commit
751f878765
1 changed files with 4 additions and 1 deletions
|
|
@ -130,7 +130,10 @@ in {
|
|||
(acc: key: let
|
||||
site = cfg.${key};
|
||||
dump = site.backup.database;
|
||||
paths = lib.mkIf (dump != null) ["/var/backup/${key}.sql"] ++ site.backup.paths;
|
||||
paths = builtins.concatLists [
|
||||
site.backup.paths
|
||||
(if dump != null then [ "/var/backup/${key}.sql" ] else [])
|
||||
];
|
||||
preHook = lib.mkIf (dump != null) ''
|
||||
mkdir -p /var/backup
|
||||
${pkgs.sudo}/bin/sudo -u postgres pg_dump ${dump} > /var/backup/postgres/${key}.sql
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue