services: add postgres-backup
This commit is contained in:
parent
f766d093e2
commit
bfba8c005c
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
];
|
];
|
||||||
|
|
16
services/postgresql-backup.nix
Normal file
16
services/postgresql-backup.nix
Normal 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;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in a new issue