X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=systems%2Fzoldene%2Flogging.nix;h=2b6e331126a09d3b2507c6b46391e79a2be5d8c3;hb=d1527470d38cfbd439c4da83c73ef68b02e9de9a;hp=a0f8c9dc83ab8a09fc97d9256db77a6a1ea5a68a;hpb=90d0d66c5e4a0108b0a90f90d66a712b66527c27;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/systems/zoldene/logging.nix b/systems/zoldene/logging.nix index a0f8c9d..2b6e331 100644 --- a/systems/zoldene/logging.nix +++ b/systems/zoldene/logging.nix @@ -53,6 +53,12 @@ in group = config.users.users.postgres.group; mode = "0755"; } + { + directory = "/var/lib/postgresql/${psqlVersion}"; + user = config.users.users.postgres.name; + group = config.users.users.postgres.group; + mode = "0755"; + } { directory = "/var/lib/fluentbit"; user = config.users.users.fluentbit.name; @@ -110,6 +116,21 @@ in ]; }; }; + systemd.services.postgresql.after = [ + "var-lib-postgresql.mount" + "var-lib-postgresql-16.mount" + "persist-zfast-var-lib-postgresql.mount" + "persist-zfast-var-lib-postgresql-16.mount" + ]; + systemd.services.postgresql.unitConfig = { + BindsTo = [ + "var-lib-postgresql.mount" + "var-lib-postgresql-16.mount" + "persist-zfast-var-lib-postgresql.mount" + "persist-zfast-var-lib-postgresql-16.mount" + ]; + }; + services.postgresql = { enable = true; package = pkgs.postgresql_16;