mirror of
https://github.com/fort-nix/nix-bitcoin.git
synced 2024-11-23 14:56:43 +03:00
Merge fort-nix/nix-bitcoin#460: backups: bring in line with upstream duplicity
5bee663e30
backups: bring in line with upstream duplicity (nixbitcoin) Pull request description: ACKs for top commit: erikarvstedt: ACK5bee663e30
jonasnick: ACK5bee663e30
Tree-SHA512: 5dc3e7e0522d5a7039868ed84f6849ff561c194fa5d9c17c217fa22e89b1ed3636eba8c14ed92f91c63ce9199f03411266c602ee8339e773e8f48599f520e208
This commit is contained in:
commit
952a499ef0
@ -3,7 +3,16 @@
|
|||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
options.services.backups = {
|
options.services.backups = {
|
||||||
enable = mkEnableOption "Backups service";
|
enable = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = ''
|
||||||
|
Enable backups of node data.
|
||||||
|
This uses the NixOS duplicity service.
|
||||||
|
To further configure the backup, you can set NixOS options `services.duplicity.*`.
|
||||||
|
The `services.duplicity.cleanup.*` options are particularly useful.
|
||||||
|
'';
|
||||||
|
};
|
||||||
with-bulk-data = mkOption {
|
with-bulk-data = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = false;
|
default = false;
|
||||||
@ -87,8 +96,8 @@ in {
|
|||||||
enable = true;
|
enable = true;
|
||||||
extraFlags = [
|
extraFlags = [
|
||||||
"--include-filelist" "${filelist}"
|
"--include-filelist" "${filelist}"
|
||||||
"--full-if-older-than" "1M"
|
|
||||||
];
|
];
|
||||||
|
fullIfOlderThan = mkDefault "1M";
|
||||||
targetUrl = cfg.destination;
|
targetUrl = cfg.destination;
|
||||||
frequency = cfg.frequency;
|
frequency = cfg.frequency;
|
||||||
secretFile = "${config.nix-bitcoin.secretsDir}/backup-encryption-env";
|
secretFile = "${config.nix-bitcoin.secretsDir}/backup-encryption-env";
|
||||||
|
Loading…
Reference in New Issue
Block a user