Unverified Commit 30703173 authored by Diogo Correia's avatar Diogo Correia
Browse files

nixos/linkwarden: depend on postgresql.target instead of .service

Depending on postgresql.service only ensures the database is at least in
read-only mode, while postgresql.target ensures read-write operation.
parent 6d6c6bd6
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -240,11 +240,11 @@ in
      requires = [
        "network-online.target"
      ]
      ++ lib.optionals cfg.database.createLocally [ "postgresql.service" ];
      ++ lib.optionals cfg.database.createLocally [ "postgresql.target" ];
      after = [
        "network-online.target"
      ]
      ++ lib.optionals cfg.database.createLocally [ "postgresql.service" ];
      ++ lib.optionals cfg.database.createLocally [ "postgresql.target" ];
      wantedBy = [ "multi-user.target" ];
      environment = cfg.environment // {
        # Required, otherwise chrome dumps core
@@ -262,12 +262,12 @@ in
        "network-online.target"
        "linkwarden.service"
      ]
      ++ lib.optionals cfg.database.createLocally [ "postgresql.service" ];
      ++ lib.optionals cfg.database.createLocally [ "postgresql.target" ];
      after = [
        "network-online.target"
        "linkwarden.service"
      ]
      ++ lib.optionals cfg.database.createLocally [ "postgresql.service" ];
      ++ lib.optionals cfg.database.createLocally [ "postgresql.target" ];
      wantedBy = [ "multi-user.target" ];
      environment = cfg.environment // {
        # Required, otherwise chrome dumps core