aboutsummaryrefslogtreecommitdiff
path: root/profiles/postgresql.nix
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2026-01-23 08:49:30 -0800
committerFranck Cuny <franck@fcuny.net>2026-01-23 08:49:30 -0800
commitc78f92b2e9313f75bb29abb919171979393ec0c8 (patch)
treec90c010f36cf28697fac3bcca49e9f6c591302f4 /profiles/postgresql.nix
parentsimplify secrets management with dynamic public key generation (diff)
downloadinfra-c78f92b2e9313f75bb29abb919171979393ec0c8.tar.gz
enable postgresql + backups
Diffstat (limited to '')
-rw-r--r--profiles/postgresql.nix20
1 files changed, 20 insertions, 0 deletions
diff --git a/profiles/postgresql.nix b/profiles/postgresql.nix
new file mode 100644
index 0000000..6e473ad
--- /dev/null
+++ b/profiles/postgresql.nix
@@ -0,0 +1,20 @@
+{ ... }:
+{
+ services.postgresql = {
+ enable = true;
+ authentication = ''
+ local all all peer map=mapping
+ '';
+ identMap = ''
+ mapping fcuny postgres
+ mapping root postgres
+ mapping postgres postgres
+ mapping /^(.*)$ \1
+ '';
+ };
+
+ services.postgresqlBackup = {
+ enable = true;
+ compression = "zstd";
+ };
+}