nixos: services: postgresql: persist data
This commit is contained in:
parent
d0da754a65
commit
1320cfbcb0
|
@ -18,6 +18,13 @@ in
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|
||||||
|
# Only persist directory if the actual service is enabled
|
||||||
|
(lib.mkIf config.services.postgresql.enable {
|
||||||
|
my.system.persist.directories = [
|
||||||
|
config.services.postgresql.dataDir
|
||||||
|
];
|
||||||
|
})
|
||||||
|
|
||||||
# Taken from the manual
|
# Taken from the manual
|
||||||
(lib.mkIf cfg.upgradeScript {
|
(lib.mkIf cfg.upgradeScript {
|
||||||
environment.systemPackages =
|
environment.systemPackages =
|
||||||
|
|
Loading…
Reference in a new issue