about summary refs log tree commit diff
path: root/nix/hosts/corrino/www/r2wa.rs.nix
diff options
context:
space:
mode:
authorEmile <git@emile.space>2024-08-16 23:33:53 +0200
committerEmile <git@emile.space>2024-08-16 23:33:53 +0200
commitcea6896788a42c0ea40f99deb4b5987d6741e360 (patch)
tree7b65658ce082cab4f552b0a42fa171745f003bd2 /nix/hosts/corrino/www/r2wa.rs.nix
parentdcfc18774fe2d4207c2996b2d16ea67499b70228 (diff)
big dump, forgot to commit...
Diffstat (limited to 'nix/hosts/corrino/www/r2wa.rs.nix')
-rw-r--r--nix/hosts/corrino/www/r2wa.rs.nix29
1 files changed, 25 insertions, 4 deletions
diff --git a/nix/hosts/corrino/www/r2wa.rs.nix b/nix/hosts/corrino/www/r2wa.rs.nix
index f7a0a7e..7da11e1 100644
--- a/nix/hosts/corrino/www/r2wa.rs.nix
+++ b/nix/hosts/corrino/www/r2wa.rs.nix
@@ -1,16 +1,37 @@
-{ ... }:
+{ config, pkgs, ... }:
 
 {
   services.nginx.virtualHosts."r2wa.rs" = {
     forceSSL = true;
     enableACME = true;
 
-    # kTLS = true;
-
     locations = {
       "/" = {
-				return = "301 http://emile.space/blog/2020/r2wars/";
+        proxyPass = "http://127.0.0.1:${toString config.emile.ports.r2wars-web}";
       };
 		};
 	};
+
+  environment.systemPackages = with pkgs; [ radare2 ];
+
+  # deploy:
+  # - push code
+  # - build in order to get the new hash (nix build .#r2war-sweb)
+  # - update hash in the package (//nix/pkgs/r2wars-web/default.nix)
+  # - deploy
+
+  services.emile.r2wars-web = {
+    enable = true;
+
+    host = "127.0.0.1";
+    port = config.emile.ports.r2wars-web;
+
+    # TODO(emile): change these when going live
+    sessionKey = "insecuretmpkey";
+    salt = "insecuresalt";
+
+    logfilePath = "/var/lib/r2wars/r2wars.log";
+    databasePath = "/var/lib/r2wars/main.db";
+    sessiondbPath = "/var/lib/r2wars/session.db";
+  };
 }