summary refs log tree commit diff stats
path: root/modules/by-name/po/postgresql/module.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/by-name/po/postgresql/module.nix')
-rw-r--r--modules/by-name/po/postgresql/module.nix19
1 files changed, 19 insertions, 0 deletions
diff --git a/modules/by-name/po/postgresql/module.nix b/modules/by-name/po/postgresql/module.nix
new file mode 100644
index 0000000..319c3ac
--- /dev/null
+++ b/modules/by-name/po/postgresql/module.nix
@@ -0,0 +1,19 @@
+{
+  config,
+  lib,
+  ...
+}: let
+  cfg = config.vhack.postgresql;
+in {
+  options.vhack.postgresql = {
+    enable = lib.mkEnableOption "postgresql";
+  };
+
+  config = lib.mkIf cfg.enable {
+    vhack.persist.directories = [
+      "/var/lib/postgresql"
+    ];
+
+    services.postgresql.enable = true;
+  };
+}