This commit is contained in:
2025-12-20 21:32:55 +00:00
parent 60d89ca103
commit 49ba2163a7

View File

@@ -21,7 +21,9 @@ in {
description = "Path to the environment file containing S3 credentials and cipher passphrase";
};
s3 = {
s3 = mkOption {
type = types.submodule {
options = {
endpoint = mkOption {
type = types.str;
default = "s3.eu-central-003.backblazeb2.com";
@@ -45,8 +47,14 @@ in {
description = "Path within the S3 bucket";
};
};
};
default = {};
description = "S3 storage configuration";
};
retention = {
retention = mkOption {
type = types.submodule {
options = {
full = mkOption {
type = types.int;
default = 7;
@@ -59,8 +67,14 @@ in {
description = "Number of differential backups to retain";
};
};
};
default = {};
description = "Backup retention configuration";
};
compression = {
compression = mkOption {
type = types.submodule {
options = {
type = mkOption {
type = types.str;
default = "zst";
@@ -73,6 +87,10 @@ in {
description = "Compression level";
};
};
};
default = {};
description = "Compression configuration";
};
processMax = mkOption {
type = types.int;
@@ -80,7 +98,9 @@ in {
description = "Maximum number of processes for parallel operations";
};
schedule = {
schedule = mkOption {
type = types.submodule {
options = {
full = mkOption {
type = types.str;
default = "daily";
@@ -94,6 +114,10 @@ in {
};
};
};
default = {};
description = "Backup schedule configuration";
};
};
config = mkIf cfg.enable (let
archivePushScript = pkgs.writeShellScript "pgbackrest-archive-push" ''