mirror of
https://github.com/oqyude/nixos.git
synced 2026-10-07 20:47:14 +03:00
br v4
This commit is contained in:
@@ -7,8 +7,12 @@
|
||||
...
|
||||
}:
|
||||
let
|
||||
sourceDir = "${xlib.dirs.services-mnt-folder}/postgresql";
|
||||
targetDir = "/var/lib/postgresql";
|
||||
storage = xlib.helpers.mkServiceStorage {
|
||||
name = "postgresql";
|
||||
user = "postgres";
|
||||
group = "postgres";
|
||||
mode = "0760";
|
||||
};
|
||||
in
|
||||
{
|
||||
services = {
|
||||
@@ -19,21 +23,5 @@ in
|
||||
# postgresqlBackup.enable = true;
|
||||
};
|
||||
|
||||
systemd = {
|
||||
tmpfiles.rules = [
|
||||
"d ${sourceDir} 0760 postgres postgres -"
|
||||
"z ${sourceDir} 0760 postgres postgres -"
|
||||
];
|
||||
mounts = [
|
||||
{
|
||||
enable = true;
|
||||
options = "bind,x-systemd.automount,nofail";
|
||||
requires = [ "local-fs.target" ];
|
||||
type = "none";
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
what = "${sourceDir}";
|
||||
where = "${targetDir}";
|
||||
}
|
||||
];
|
||||
};
|
||||
systemd = storage.systemd;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user