backups: don't use hardcoded secrets dir
This commit is contained in:
parent
c29d44b49a
commit
803584a288
@ -4,13 +4,15 @@ with lib;
|
|||||||
|
|
||||||
let
|
let
|
||||||
cfg = config.services.backups;
|
cfg = config.services.backups;
|
||||||
|
secretsDir = config.nix-bitcoin.secretsDir;
|
||||||
|
|
||||||
filelist = pkgs.writeText "filelist.txt" ''
|
filelist = pkgs.writeText "filelist.txt" ''
|
||||||
${optionalString (!cfg.with-bulk-data) "- ${config.services.bitcoind.dataDir}/blocks"}
|
${optionalString (!cfg.with-bulk-data) "- ${config.services.bitcoind.dataDir}/blocks"}
|
||||||
${optionalString (!cfg.with-bulk-data) "- ${config.services.bitcoind.dataDir}/chainstate"}
|
${optionalString (!cfg.with-bulk-data) "- ${config.services.bitcoind.dataDir}/chainstate"}
|
||||||
${config.services.bitcoind.dataDir}
|
${config.services.bitcoind.dataDir}
|
||||||
${config.services.clightning.dataDir}
|
${config.services.clightning.dataDir}
|
||||||
${config.services.lnd.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}/*/blocks"}
|
||||||
${optionalString (!cfg.with-bulk-data) "- ${config.services.liquidd.dataDir}/*/chainstate"}
|
${optionalString (!cfg.with-bulk-data) "- ${config.services.liquidd.dataDir}/*/chainstate"}
|
||||||
${config.services.liquidd.dataDir}
|
${config.services.liquidd.dataDir}
|
||||||
@ -18,7 +20,7 @@ let
|
|||||||
${config.services.nbxplorer.dataDir}
|
${config.services.nbxplorer.dataDir}
|
||||||
${config.services.btcpayserver.dataDir}
|
${config.services.btcpayserver.dataDir}
|
||||||
${config.services.joinmarket.dataDir}
|
${config.services.joinmarket.dataDir}
|
||||||
/secrets/jm-wallet-seed
|
${secretsDir}/jm-wallet-seed
|
||||||
${config.services.postgresqlBackup.location}/btcpaydb.sql.gz
|
${config.services.postgresqlBackup.location}/btcpaydb.sql.gz
|
||||||
/var/lib/tor
|
/var/lib/tor
|
||||||
# Extra files
|
# Extra files
|
||||||
@ -27,7 +29,6 @@ let
|
|||||||
# Exclude all unspecified files and directories
|
# Exclude all unspecified files and directories
|
||||||
- /
|
- /
|
||||||
'';
|
'';
|
||||||
|
|
||||||
in {
|
in {
|
||||||
options.services.backups = {
|
options.services.backups = {
|
||||||
enable = mkEnableOption "Backups service";
|
enable = mkEnableOption "Backups service";
|
||||||
|
Loading…
Reference in New Issue
Block a user