summary refs log tree commit diff
path: root/nixos/modules/services/web-apps/restya-board.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixos/modules/services/web-apps/restya-board.nix')
-rw-r--r--nixos/modules/services/web-apps/restya-board.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/nixos/modules/services/web-apps/restya-board.nix b/nixos/modules/services/web-apps/restya-board.nix
index 4b32f06826e..959bcbc5c9f 100644
--- a/nixos/modules/services/web-apps/restya-board.nix
+++ b/nixos/modules/services/web-apps/restya-board.nix
@@ -263,8 +263,8 @@ in
       serviceConfig.RemainAfterExit = true;
 
       wantedBy = [ "multi-user.target" ];
-      requires = if cfg.database.host == null then [] else [ "postgresql.service" ];
-      after = [ "network.target" ] ++ (if cfg.database.host == null then [] else [ "postgresql.service" ]);
+      requires = lib.optional (cfg.database.host != null) "postgresql.service";
+      after = [ "network.target" ] ++ (lib.optional (cfg.database.host != null) "postgresql.service");
 
       script = ''
         rm -rf "${runDir}"