services/{nginx,postgres,synapse}: init
This commit is contained in:
parent
accf26c1ea
commit
3bea2397f5
5 changed files with 148 additions and 14 deletions
12
modules/services/postgres.nix
Normal file
12
modules/services/postgres.nix
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{ config, ... }:
|
||||
let
|
||||
dir = "/persist/postgresql/${config.services.postgresql.package.psqlSchema}";
|
||||
uid = config.ids.uids.postgres;
|
||||
gid = config.ids.gids.postgres;
|
||||
in {
|
||||
systemd.tmpfiles.rules = [ "d ${dir} 700 ${uid} ${gid}" ];
|
||||
services.postgresql = {
|
||||
enable = true;
|
||||
dataDir = dir;
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue