mirror of
https://github.com/Swarsel/.dotfiles.git
synced 2025-12-06 17:17:22 +01:00
fix[server]: get cache working
This commit is contained in:
parent
0c3aee7997
commit
969ae3302d
16 changed files with 1245 additions and 292 deletions
|
|
@ -2,6 +2,7 @@
|
|||
let
|
||||
inherit (confLib.gen { name = "postgresql"; port = 3254; }) serviceName;
|
||||
postgresVersion = 14;
|
||||
postgresDirPrefix = if config.swarselsystems.isCloud then "/var/lib" else "/Vault/data";
|
||||
in
|
||||
{
|
||||
options.swarselmodules.server.${serviceName} = lib.mkEnableOption "enable ${serviceName} on server";
|
||||
|
|
@ -10,8 +11,12 @@ in
|
|||
${serviceName} = {
|
||||
enable = true;
|
||||
package = pkgs."postgresql_${builtins.toString postgresVersion}";
|
||||
dataDir = "/Vault/data/${serviceName}/${builtins.toString postgresVersion}";
|
||||
dataDir = "${postgresDirPrefix}/${serviceName}/${builtins.toString postgresVersion}";
|
||||
};
|
||||
};
|
||||
environment.persistence."/persist".directories = lib.mkIf (config.swarselsystems.isImpermanence && config.swarselsystems.isCloud) [
|
||||
{ directory = "/var/lib/postgresql"; user = "postgres"; group = "postgres"; mode = "0750"; }
|
||||
];
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue