Skip to content

Commit a99623e

Browse files
committed
lk-jwt-service: init
1 parent 53ff52f commit a99623e

File tree

3 files changed

+26
-1
lines changed

3 files changed

+26
-1
lines changed

nixos/tests/all-tests.nix

+1
Original file line numberDiff line numberDiff line change
@@ -737,6 +737,7 @@ in
737737
listmonk = handleTestOn [ "x86_64-linux" "aarch64-linux" ] ./listmonk.nix { };
738738
litellm = runTest ./litellm.nix;
739739
litestream = handleTest ./litestream.nix { };
740+
lk-jwt-service = runTest ./matrix/lk-jswt-service.nix;
740741
lldap = handleTest ./lldap.nix { };
741742
localsend = handleTest ./localsend.nix { };
742743
locate = handleTest ./locate.nix { };

nixos/tests/matrix/lk-jwt-service.nix

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
pkgs,
3+
lib,
4+
...
5+
}: {
6+
name = "lk-jwt-service";
7+
meta.maintainers = [lib.maintainers.quadradical];
8+
9+
nodes.machine = {
10+
services.lk-jwt-service = {
11+
enable = true;
12+
keyFile = pkgs.writers.writeYAML "keys.yaml" {key = "f6lQGaHtM5HfgZjIcec3cOCRfiDqIine4CpZZnqdT5cE";};
13+
livekitUrl = "wss://127.0.0.1:8100";
14+
port = 8000;
15+
};
16+
};
17+
18+
testScript = ''
19+
machine.wait_for_unit("lk-jwt-service.service")
20+
machine.succeed("curl 127.0.0.1:8000/sfu/get")
21+
'';
22+
}

pkgs/by-name/lk/lk-jwt-service/package.nix

+3-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
lib,
33
buildGoModule,
44
fetchFromGitHub,
5+
nixosTests,
56
}:
6-
77
buildGoModule (finalAttrs: {
88
pname = "lk-jwt-service";
99
version = "0.2.3";
@@ -17,6 +17,8 @@ buildGoModule (finalAttrs: {
1717

1818
vendorHash = "sha256-47eJO1Ai78RuhlEPn/J1cd+YSqvmfUD8cuPZIqsdxvI=";
1919

20+
passthru.tests = nixosTests.lk-jwt-service;
21+
2022
meta = with lib; {
2123
changelog = "https://github.com/element-hq/lk-jwt-service/releases/tag/${finalAttrs.src.tag}";
2224
description = "Minimal service to issue LiveKit JWTs for MatrixRTC";

0 commit comments

Comments
 (0)