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