about summary refs log tree commit diff
path: root/nix/hosts/corrino/www/r2wa.rs.nix
diff options
context:
space:
mode:
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";
+  };
 }