nixos: services: postgresql: persist data
This commit is contained in:
parent
1e4ae91b44
commit
be58c8d8cd
1 changed files with 7 additions and 0 deletions
|
|
@ -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 {
|
||||||
containers.temp-pg.config.services.postgresql = {
|
containers.temp-pg.config.services.postgresql = {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue