This commit is contained in:
2025-02-01 21:32:26 -05:00
parent b98adc50f6
commit a22012df2c
18 changed files with 102 additions and 79 deletions

21
services/postgresql.nix Normal file
View File

@@ -0,0 +1,21 @@
{
pkgs,
config,
username,
...
}:
{
services.postgresql = {
enable = true;
package = pkgs.postgresql_16;
dataDir = "/tank/services/sql";
};
systemd.tmpfiles.rules = [
"d ${config.services.postgresql.dataDir} 0700 postgresql postgresql"
];
users.users.${username}.extraGroups = [
"postgresql"
];
}