about summary refs log tree commit diff
path: root/nix
diff options
context:
space:
mode:
authorEmile <git@emile.space>2024-08-17 17:12:52 +0200
committerEmile <git@emile.space>2024-08-17 17:12:52 +0200
commit902c97cf9aa16c5bb4a45b28f182e4d6033156e7 (patch)
tree1327bb465d40bd7026c5c380eb692462c300f345 /nix
parentc16ad8075e4ee356a6a3134a077778c43afb354e (diff)
r2wars-web module: add version, add r2 to path
Diffstat (limited to 'nix')
-rw-r--r--nix/modules/r2wars-web/default.nix6
1 files changed, 6 insertions, 0 deletions
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";
     };
   };