From 902c97cf9aa16c5bb4a45b28f182e4d6033156e7 Mon Sep 17 00:00:00 2001
From: Emile <git@emile.space>
Date: Sat, 17 Aug 2024 17:12:52 +0200
Subject: r2wars-web module: add version, add r2 to path

---
 nix/modules/r2wars-web/default.nix | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'nix/modules')

diff --git a/nix/modules/r2wars-web/default.nix b/nix/modules/r2wars-web/default.nix
index 7e37b26..de3f105 100644
--- a/nix/modules/r2wars-web/default.nix
+++ b/nix/modules/r2wars-web/default.nix
@@ -63,10 +63,16 @@ in with lib; {
   config = mkIf cfg.enable {
     systemd.services.r2wars-web = {
       wantedBy = [ "multi-user.target" ];
+      serviceConfig = {
+        RestartSec = 5;
+        Restart = "always";
+      };
       environment = {
         SESSION_KEY = cfg.sessionKey;
         SALT = cfg.salt;
+        VERSION = pkgs.r2wars-web.version;
       };
+      path = [ pkgs.radare2 ];
       serviceConfig.ExecStart = "${pkgs.r2wars-web}/bin/r2wars-web -h ${cfg.host} -p ${toString cfg.port} --logfilepath ${cfg.logfilePath} --databasepath ${cfg.databasePath} --sessiondbpath ${cfg.sessiondbPath} --templates ${pkgs.r2wars-web}/templates";
     };
   };
-- 
cgit 1.4.1