mirror of
https://github.com/nmasur/dotfiles
synced 2025-01-30 16:22:03 +00:00
backup paperless and adjust restic bucket
This commit is contained in:
parent
d31a083ed6
commit
0f7c15bf36
@ -134,7 +134,7 @@ inputs.nixpkgs.lib.nixosSystem rec {
|
||||
endpoint = "s3.us-west-002.backblazeb2.com";
|
||||
bucket = "noahmasur-backup";
|
||||
accessKeyId = "0026b0e73b2e2c80000000005";
|
||||
glacierBucket = "noahmasur-archive";
|
||||
resticBucket = "noahmasur-restic";
|
||||
};
|
||||
|
||||
# Disable passwords, only use SSH key
|
||||
|
@ -22,9 +22,9 @@
|
||||
description = "S3 access key ID for backups";
|
||||
default = null;
|
||||
};
|
||||
glacierBucket = lib.mkOption {
|
||||
resticBucket = lib.mkOption {
|
||||
type = lib.types.nullOr lib.types.str;
|
||||
description = "S3 bucket for glacier backups";
|
||||
description = "S3 bucket for restic backups";
|
||||
default = null;
|
||||
};
|
||||
};
|
||||
@ -84,9 +84,9 @@
|
||||
dest = "${config.secretsDirectory}/restic";
|
||||
};
|
||||
|
||||
services.restic.backups = lib.mkIf (config.backup.s3.glacierBucket != null) {
|
||||
services.restic.backups = lib.mkIf (config.backup.s3.resticBucket != null) {
|
||||
default = {
|
||||
repository = "s3:s3.us-east-1.amazonaws.com/${config.backup.s3.glacierBucket}/restic";
|
||||
repository = "s3:s3.us-east-1.amazonaws.com/${config.backup.s3.resticBucket}/restic";
|
||||
paths = [ ];
|
||||
environmentFile = config.secrets.s3-glacier.dest;
|
||||
passwordFile = config.secrets.restic.dest;
|
||||
|
@ -57,5 +57,9 @@
|
||||
systemd.services.paperless-web.serviceConfig.UMask = lib.mkForce "0026";
|
||||
systemd.services.paperless-scheduler.serviceConfig.UMask = lib.mkForce "0026";
|
||||
systemd.services.paperless-task-queue.serviceConfig.UMask = lib.mkForce "0026";
|
||||
|
||||
# Backups
|
||||
services.restic.backups.default.paths = [ "/data/generic/paperless/documents" ];
|
||||
|
||||
};
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user