From 803584a28889f27ebdc57bf165edff7cec9dfc6b Mon Sep 17 00:00:00 2001 From: Erik Arvstedt Date: Mon, 1 Feb 2021 23:39:11 +0100 Subject: [PATCH] backups: don't use hardcoded secrets dir --- modules/backups.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/modules/backups.nix b/modules/backups.nix index 13a922c..2669620 100644 --- a/modules/backups.nix +++ b/modules/backups.nix @@ -4,13 +4,15 @@ with lib; let cfg = config.services.backups; + secretsDir = config.nix-bitcoin.secretsDir; + filelist = pkgs.writeText "filelist.txt" '' ${optionalString (!cfg.with-bulk-data) "- ${config.services.bitcoind.dataDir}/blocks"} ${optionalString (!cfg.with-bulk-data) "- ${config.services.bitcoind.dataDir}/chainstate"} ${config.services.bitcoind.dataDir} ${config.services.clightning.dataDir} ${config.services.lnd.dataDir} - /secrets/lnd-seed-mnemonic + ${secretsDir}/lnd-seed-mnemonic ${optionalString (!cfg.with-bulk-data) "- ${config.services.liquidd.dataDir}/*/blocks"} ${optionalString (!cfg.with-bulk-data) "- ${config.services.liquidd.dataDir}/*/chainstate"} ${config.services.liquidd.dataDir} @@ -18,7 +20,7 @@ let ${config.services.nbxplorer.dataDir} ${config.services.btcpayserver.dataDir} ${config.services.joinmarket.dataDir} - /secrets/jm-wallet-seed + ${secretsDir}/jm-wallet-seed ${config.services.postgresqlBackup.location}/btcpaydb.sql.gz /var/lib/tor # Extra files @@ -27,7 +29,6 @@ let # Exclude all unspecified files and directories - / ''; - in { options.services.backups = { enable = mkEnableOption "Backups service";