nixos-config/machines/loki/barman.nix

33 lines
1 KiB
Nix
Raw Normal View History

2024-10-03 08:34:20 +02:00
{ pkgs, config, ... }:
{
services.barman = {
enable = true;
package = (
pkgs.barman.overrideAttrs (prevAttrs: {
propagatedBuildInputs = prevAttrs.propagatedBuildInputs ++ [ pkgs.python3Packages.distutils ];
})
);
settings = {
barman = {
# log_file = "/var/log/barman/barman.log";
configuration_files_directory = "/etc/barman.d";
create_slot = "auto";
};
};
servers = {
ha = {
description = "Home Assistant database";
conninfo = "host=10.0.0.254 user=postgres dbname=homeassistant passfile=${config.sops.secrets.barman-passwords.path}";
wal_streaming_conninfo = "host=10.0.0.254 user=postgres dbname=homeassistant passfile=${config.sops.secrets.barman-passwords.path}";
streaming_archiver = true;
backup_method = "postgres";
slot_name = "barman";
retention_policy = "RECOVERY WINDOW OF 4 WEEKS";
};
};
# passwordsFile = config.sops.secrets.barman-passwords.path;
};
}