]> git.immae.eu Git - perso/Immae/Config/Nix.git/commitdiff
Use systemd RuntimeDirectory for postgresql
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Sun, 12 May 2019 11:18:51 +0000 (13:18 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Sun, 12 May 2019 11:22:43 +0000 (13:22 +0200)
nixops/modules/databases/postgresql.nix

index 37fcc1490862dafd575d728eb4a9e1b94c125832..de0820f238ef1559145c3e64ad0e14858a318ca2 100644 (file)
@@ -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;