about summary refs log tree commit diff
path: root/nix/modules
diff options
context:
space:
mode:
authorEmile <git@emile.space>2024-10-29 22:44:08 +0100
committerEmile <git@emile.space>2024-10-29 22:44:08 +0100
commit37d8c4d2633fea252a44eb2024799bd15d896387 (patch)
treeb48e7a0099db9b242029ffa37124ca9c6e1da43d /nix/modules
parenta7a14fde7cde4612347f83ec37585cf4268072e6 (diff)
marvin pkg + module
Diffstat (limited to 'nix/modules')
-rw-r--r--nix/modules/remarvin/default.nix28
-rw-r--r--nix/modules/x86_64-linux.nix1
2 files changed, 5 insertions, 24 deletions
diff --git a/nix/modules/remarvin/default.nix b/nix/modules/remarvin/default.nix
index d95e3f2..d9e449a 100644
--- a/nix/modules/remarvin/default.nix
+++ b/nix/modules/remarvin/default.nix
@@ -13,21 +13,6 @@ with lib;
   options.services.emile.remarvin = {
     enable = mkEnableOption "Enable remarvin";
 
-    # ip and port to listen on
-    host = mkOption {
-      type = types.str;
-      default = "127.0.0.1";
-      example = "0.0.0.0";
-      description = "The host the service listens on";
-    };
-
-    port = mkOption {
-      type = types.int;
-      default = 8080;
-      example = 8080;
-      description = "The port the service listens on";
-    };
-
     # env vars with secrets to set
     username = mkOption {
       type = types.str;
@@ -43,11 +28,11 @@ with lib;
       description = "The homeserver to use";
     };
 
-    accesstoken = mkOption {
+    accesstokenpath = mkOption {
       type = types.str;
       default = "";
-      example = "syt_bWFy2mluX34lc3Qx_VARzpUOQIzyzCHunCDnd_1hbPka";
-      description = "The accesstoken used to authenticat (element web > settings > help & about > advanced > access token)";
+      example = "/secret/remarvin_accesstoken";
+      description = "The path to the accesstoken used (element web > settings > help & about > advanced > access token)";
     };
   };
 
@@ -58,13 +43,8 @@ with lib;
         RestartSec = 5;
         Restart = "always";
       };
-      environment = {
-        SESSION_KEY = cfg.sessionKey;
-        SALT = cfg.salt;
-        VERSION = pkgs.r2wars-web.version;
-      };
       path = [ pkgs.remarvin ];
-      serviceConfig.ExecStart = "${pkgs.remarvin}/bin/remarvin -homeserver ${cfg.homeserver} -username ${cfg.username} -accesstoken ${cfg.accesstoken}";
+      serviceConfig.ExecStart = "${pkgs.remarvin}/bin/remarvin -homeserver ${cfg.homeserver} -username ${cfg.username} -accesstokenpath ${cfg.accesstokenpath}";
     };
   };
 }
diff --git a/nix/modules/x86_64-linux.nix b/nix/modules/x86_64-linux.nix
index 9f81e10..8737083 100644
--- a/nix/modules/x86_64-linux.nix
+++ b/nix/modules/x86_64-linux.nix
@@ -2,5 +2,6 @@
   imports = [
     ./ports
     ./r2wars-web
+    ./remarvin
   ];
 }