From cdd10f53729697704e05374fccaedda48fad6336 Mon Sep 17 00:00:00 2001 From: Rouven Seifert Date: Mon, 21 Aug 2023 11:40:56 +0200 Subject: [PATCH] postgres: enable backups --- flake.nix | 1 + modules/postgres.nix | 8 ++++++++ 2 files changed, 9 insertions(+) create mode 100644 modules/postgres.nix diff --git a/flake.nix b/flake.nix index a3c47cd..8db58b9 100755 --- a/flake.nix +++ b/flake.nix @@ -35,6 +35,7 @@ ./modules/nginx.nix ./modules/userdir.nix ./modules/hedgedoc.nix + ./modules/postgres.nix ./modules/wiki.nix ./modules/ftp.nix ./modules/stream.nix diff --git a/modules/postgres.nix b/modules/postgres.nix new file mode 100644 index 0000000..ad39890 --- /dev/null +++ b/modules/postgres.nix @@ -0,0 +1,8 @@ +{ ... }: +{ + # automatically back up all databases + services.postgresqlBackup = { + enable = true; + location = "/var/lib/backup/postgresql"; + }; +}