forked from c3d2/nix-config
Dump postgres databases for backups
This commit is contained in:
parent
0a0df8591a
commit
3eb015c186
|
@ -967,9 +967,13 @@
|
||||||
c3d2 = {
|
c3d2 = {
|
||||||
imports = [
|
imports = [
|
||||||
sops-nix.nixosModule
|
sops-nix.nixosModule
|
||||||
|
./modules/audio-server.nix
|
||||||
|
./modules/autoupdate.nix
|
||||||
|
./modules/backup.nix
|
||||||
./modules/c3d2.nix
|
./modules/c3d2.nix
|
||||||
./modules/nncp.nix
|
./modules/nncp.nix
|
||||||
./modules/autoupdate.nix
|
./modules/logging.nix
|
||||||
|
./modules/stats.nix
|
||||||
];
|
];
|
||||||
c3d2.hosts = hostRegistry.hosts;
|
c3d2.hosts = hostRegistry.hosts;
|
||||||
c3d2.users = import ./users.nix;
|
c3d2.users = import ./users.nix;
|
||||||
|
|
12
modules/backup.nix
Normal file
12
modules/backup.nix
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
{ config, ... }:
|
||||||
|
|
||||||
|
{
|
||||||
|
config.services.postgresqlBackup = {
|
||||||
|
enable = config.services.postgresql.enable;
|
||||||
|
backupAll = true;
|
||||||
|
compression = "zsdt";
|
||||||
|
compressionLevel = 9;
|
||||||
|
pgdumpOptions = "--create --clean";
|
||||||
|
startAt = "*-*-* 06:00:00";
|
||||||
|
};
|
||||||
|
}
|
|
@ -37,12 +37,6 @@ let
|
||||||
toHqPrivateAddress = toIpv6Address hqPrefix64;
|
toHqPrivateAddress = toIpv6Address hqPrefix64;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
imports = [
|
|
||||||
./stats.nix
|
|
||||||
./audio-server.nix
|
|
||||||
./logging.nix
|
|
||||||
];
|
|
||||||
|
|
||||||
options.c3d2 = with lib; {
|
options.c3d2 = with lib; {
|
||||||
acmeEmail = mkOption {
|
acmeEmail = mkOption {
|
||||||
type = types.str;
|
type = types.str;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user