services: add postgres-backup

This commit is contained in:
Bruno BELANYI 2021-02-04 18:28:05 +01:00
parent f766d093e2
commit bfba8c005c
3 changed files with 19 additions and 0 deletions

View file

@ -93,6 +93,8 @@
}; };
# The whole *arr software suite # The whole *arr software suite
pirate.enable = true; pirate.enable = true;
# Regular backups
postgresql-backup.enable = true;
# Usenet client # Usenet client
sabnzbd.enable = true; sabnzbd.enable = true;
# Torrent client and webui # Torrent client and webui

View file

@ -9,6 +9,7 @@
./nextcloud.nix ./nextcloud.nix
./nginx.nix ./nginx.nix
./pirate.nix ./pirate.nix
./postgresql-backup.nix
./sabnzbd.nix ./sabnzbd.nix
./transmission.nix ./transmission.nix
]; ];

View file

@ -0,0 +1,16 @@
# Backup your data, kids!
{ config, lib, ... }:
let
cfg = config.my.services.postgresql-backup;
in
{
options.my.services.postgresql-backup = {
enable = lib.mkEnableOption "Backup SQL databases";
};
config = lib.mkIf cfg.enable {
services.postgresqlBackup = {
enable = true;
};
};
}