From: Ismaƫl Bouya Date: Sun, 12 May 2019 11:18:51 +0000 (+0200) Subject: Use systemd RuntimeDirectory for postgresql X-Git-Tag: nur_publish~24 X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FConfig%2FNix.git;a=commitdiff_plain;h=b9723c401f244f83d5cfc8074bdb5f6a98884f00 Use systemd RuntimeDirectory for postgresql --- diff --git a/nixops/modules/databases/postgresql.nix b/nixops/modules/databases/postgresql.nix index 37fcc14..de0820f 100644 --- a/nixops/modules/databases/postgresql.nix +++ b/nixops/modules/databases/postgresql.nix @@ -30,11 +30,8 @@ in { ''; }; - system.activationScripts.postgresql = '' - install -m 0755 -o postgres -g postgres -d ${myconfig.env.databases.postgresql.socket} - ''; - systemd.services.postgresql.serviceConfig.SupplementaryGroups = "keys"; + systemd.services.postgresql.serviceConfig.RuntimeDirectory = "postgresql"; services.postgresql = rec { enable = cfg.postgresql.enable; package = pkgs.postgresql;