aboutsummaryrefslogtreecommitdiff
path: root/app/backup/build/backup-psql/default.nix
diff options
context:
space:
mode:
authorQuentin Dufour <quentin@deuxfleurs.fr>2022-04-14 17:50:17 +0200
committerQuentin Dufour <quentin@deuxfleurs.fr>2022-04-14 17:50:17 +0200
commit9701b863fd2703450abe19eda0940ee2faf1ec15 (patch)
tree5c00a681c9e7c6be14a4a78d1e77d32f19d07e0c /app/backup/build/backup-psql/default.nix
parent1183583fdf0a7b054b7da769bd92d53186ace3fe (diff)
downloadinfrastructure-9701b863fd2703450abe19eda0940ee2faf1ec15.tar.gz
infrastructure-9701b863fd2703450abe19eda0940ee2faf1ec15.zip
Create a backup script
Diffstat (limited to 'app/backup/build/backup-psql/default.nix')
-rw-r--r--app/backup/build/backup-psql/default.nix16
1 files changed, 16 insertions, 0 deletions
diff --git a/app/backup/build/backup-psql/default.nix b/app/backup/build/backup-psql/default.nix
new file mode 100644
index 0000000..94dd4e1
--- /dev/null
+++ b/app/backup/build/backup-psql/default.nix
@@ -0,0 +1,16 @@
+{ pkgs ? import <nixpkgs> {} }:
+let
+ python-with-my-packages = pkgs.python3.withPackages (p: with p; [
+ minio
+ ]);
+in
+pkgs.mkShell {
+ buildInputs = [
+ python-with-my-packages
+ pkgs.age
+ pkgs.postgresql_14
+ ];
+ shellHook = ''
+ PYTHONPATH=${python-with-my-packages}/${python-with-my-packages.sitePackages}
+ '';
+}