diff --git a/hosts/Infini-DL360/default.nix b/hosts/Infini-DL360/default.nix index 8fe7a76..c718959 100644 --- a/hosts/Infini-DL360/default.nix +++ b/hosts/Infini-DL360/default.nix @@ -10,6 +10,7 @@ ./forgejo.nix ./freshrss.nix ./jellyfin.nix + ./postgresql.nix ./thelounge.nix ./vaultwarden.nix ]; diff --git a/hosts/Infini-DL360/postgresql.nix b/hosts/Infini-DL360/postgresql.nix new file mode 100644 index 0000000..efe9f5d --- /dev/null +++ b/hosts/Infini-DL360/postgresql.nix @@ -0,0 +1,13 @@ +{ pkgs, config, lib, ... }: +let + directory = "/srv/postgresql"; +in +{ + persist.directories = [ { inherit directory; user = "postgres"; group = "postgresl"; } ]; + + services.postgresql = { + enable = true; + package = pkgs.postgresql_16; + dataDir = "${directory}/${config.services.postgresql.package.psqlSchema}"; + }; +}