From 37d8c4d2633fea252a44eb2024799bd15d896387 Mon Sep 17 00:00:00 2001 From: Emile Date: Tue, 29 Oct 2024 22:44:08 +0100 Subject: marvin pkg + module --- nix/modules/remarvin/default.nix | 28 ++++------------------------ nix/modules/x86_64-linux.nix | 1 + nix/pkgs/aarch64-darwin.nix | 1 + nix/pkgs/overlay.nix | 1 + nix/pkgs/remarvin/default.nix | 4 +--- nix/pkgs/x86_64-linux.nix | 1 + 6 files changed, 9 insertions(+), 27 deletions(-) (limited to 'nix') 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 ]; } diff --git a/nix/pkgs/aarch64-darwin.nix b/nix/pkgs/aarch64-darwin.nix index c5ecaa7..081eb59 100644 --- a/nix/pkgs/aarch64-darwin.nix +++ b/nix/pkgs/aarch64-darwin.nix @@ -1,4 +1,5 @@ final: prev: { vokobe = final.callPackage ./vokobe { inherit (final) naersk; }; r2wars-web = final.callPackage ./r2wars-web { }; + remarvin = final.callPackage ./remarvin { }; } diff --git a/nix/pkgs/overlay.nix b/nix/pkgs/overlay.nix index c5ecaa7..081eb59 100644 --- a/nix/pkgs/overlay.nix +++ b/nix/pkgs/overlay.nix @@ -1,4 +1,5 @@ final: prev: { vokobe = final.callPackage ./vokobe { inherit (final) naersk; }; r2wars-web = final.callPackage ./r2wars-web { }; + remarvin = final.callPackage ./remarvin { }; } diff --git a/nix/pkgs/remarvin/default.nix b/nix/pkgs/remarvin/default.nix index 1da157f..a45bad2 100644 --- a/nix/pkgs/remarvin/default.nix +++ b/nix/pkgs/remarvin/default.nix @@ -10,7 +10,7 @@ pkgs.buildGoModule rec { src = fetchgit { url = "git://git.emile.space/remarvin.git"; - hash = "sha256-UahNwhsxFGSpaVTk2EFtjt/MCB4Ec/08QStylL2QPUM="; + hash = "sha256-jgV5bzQQ4n9v7PgFQ5n0yFTPcjgHNQ/BYPxzTp1Os4w="; }; vendorHash = null; @@ -19,8 +19,6 @@ pkgs.buildGoModule rec { postInstall = '' mkdir -p $out - cp -r templates $out - mv $out/bin/src $out/bin/remarvin ''; diff --git a/nix/pkgs/x86_64-linux.nix b/nix/pkgs/x86_64-linux.nix index c5ecaa7..081eb59 100644 --- a/nix/pkgs/x86_64-linux.nix +++ b/nix/pkgs/x86_64-linux.nix @@ -1,4 +1,5 @@ final: prev: { vokobe = final.callPackage ./vokobe { inherit (final) naersk; }; r2wars-web = final.callPackage ./r2wars-web { }; + remarvin = final.callPackage ./remarvin { }; } -- cgit 1.4.1