From cb54891484585eaf7515854ef0b29787dd3696d0 Mon Sep 17 00:00:00 2001 From: nixbitcoin Date: Fri, 24 Sep 2021 11:27:04 +0000 Subject: [PATCH 1/2] backups: make extraFiles list of strings --- modules/backups.nix | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/modules/backups.nix b/modules/backups.nix index 4febc98..8cda1a6 100644 --- a/modules/backups.nix +++ b/modules/backups.nix @@ -31,11 +31,9 @@ let description = "List of database names to backup."; }; extraFiles = mkOption { - type = types.lines; - default = ""; - example = '' - /var/lib/nginx - ''; + type = types.listOf types.str; + default = []; + example = [ "/var/lib/nginx" ]; description = "Additional files to be appended to filelist."; }; }; @@ -62,7 +60,7 @@ let ${builtins.concatStringsSep "\n" postgresqlBackupPaths} # Extra files - ${cfg.extraFiles} + ${builtins.concatStringsSep "\n" cfg.extraFiles} # Exclude all unspecified files and directories - / From c483f1694da0775965445978a965e34566fc403a Mon Sep 17 00:00:00 2001 From: nixbitcoin Date: Fri, 24 Sep 2021 11:51:33 +0000 Subject: [PATCH 2/2] examples: correct localBackups scp command --- examples/configuration.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/configuration.nix b/examples/configuration.nix index 9346e59..dcf1f06 100644 --- a/examples/configuration.nix +++ b/examples/configuration.nix @@ -211,7 +211,7 @@ # services.backups.enable = true; # # You can pull the localBackups folder with - # `scp bitcoin-node:/var/lib/localBackups /my-backup-path/` + # `scp -r bitcoin-node:/var/lib/localBackups /my-backup-path/` # Alternatively, you can also set a remote target url, for example # services.backups.destination = "sftp://user@host[:port]/[relative|/absolute]_path"; # Supply the sftp password by appending the FTP_PASSWORD environment variable