make sure postgres is running before starting dnote service

This commit is contained in:
Joakim Repomaa
2025-02-15 03:34:14 +02:00
parent ecc02f4b59
commit 459cae639d

View File

@@ -82,6 +82,8 @@ in
enable = true; enable = true;
description = "Dnote server"; description = "Dnote server";
environment = lib.mapAttrs (_: value: serializeEnvVar value) (cfg.environment // immutableEnvironment); environment = lib.mapAttrs (_: value: serializeEnvVar value) (cfg.environment // immutableEnvironment);
after = [ "postgresql.service" ];
requires = [ "postgresql.service" ];
serviceConfig = { serviceConfig = {
ExecStart = "${pkgsUnstable.dnote}/bin/dnote-server -port ${toString cfg.port} start"; ExecStart = "${pkgsUnstable.dnote}/bin/dnote-server -port ${toString cfg.port} start";
EnvironmentFile = lib.mkIf (cfg.environmentFile != null) cfg.environmentFile; EnvironmentFile = lib.mkIf (cfg.environmentFile != null) cfg.environmentFile;