diff options
| author | Max Audron <audron@cocaine.farm> | 2024-03-29 13:55:03 +0100 |
|---|---|---|
| committer | Max Audron <audron@cocaine.farm> | 2024-03-29 13:55:03 +0100 |
| commit | 3e39e00ee7d3023219f75d9164232a5cde187aeb (patch) | |
| tree | 2fd83cf0119af572028ddedb70d1d9268effc037 /modules/laplace | |
| parent | add hydra secrets (diff) | |
add rtmp and laplace
Diffstat (limited to 'modules/laplace')
| -rw-r--r-- | modules/laplace/default.nix | 27 | ||||
| -rw-r--r-- | modules/laplace/package.nix | 29 |
2 files changed, 56 insertions, 0 deletions
diff --git a/modules/laplace/default.nix b/modules/laplace/default.nix new file mode 100644 index 0000000..57a27f0 --- /dev/null +++ b/modules/laplace/default.nix @@ -0,0 +1,27 @@ +{ config, lib, pkgs, self, ... }: + +let laplace = pkgs.callPackage ./package.nix { }; +in +{ + systemd.services.laplace = + { + description = "laplace webrtc screen sharing"; + wantedBy = [ "multi-user.target" ]; + after = [ "network.target" ]; + + serviceConfig = { + Type = "simple"; + ExecStart = "${laplace}/bin/laplace -tls=false -addr=10.10.0.1:3080"; + WorkingDirectory = "${laplace}/share/laplace"; + }; + }; + + services.nginx.virtualHosts."stream.vapor.systems" = + self.lib.nginx.proxyDomain "vapor.systems" "http://10.10.0.1:3080"; + + security.acme.certs = { + "vapor.systems" = { + extraDomainNames = [ "*.vapor.systems" ]; + }; + }; +} diff --git a/modules/laplace/package.nix b/modules/laplace/package.nix new file mode 100644 index 0000000..349eca4 --- /dev/null +++ b/modules/laplace/package.nix @@ -0,0 +1,29 @@ +{ stdenv, lib, fetchFromGitHub, makeWrapper, buildGoModule, file, glibc }: + +with lib; + +buildGoModule rec { + pname = "laplace"; + version = "6d87705"; + + src = fetchFromGitHub { + owner = "adamyordan"; + repo = "laplace"; + rev = "6d87705"; + hash = "sha256-sBeFuyDzDe1RQdxxsWqwA6pEAJqvN41evCJ6Ynw9/FA="; + }; + + buildInputs = [ stdenv ]; + + postInstall = '' + mkdir -p $out/share/laplace + cp -r ./files $out/share/laplace/files + ''; + + vendorHash = "sha256-wuSJJXzlSD1RkBmRRVUMVx+UlrIZ8NhQaFp6ZwiNSwg="; + + meta = { + description = "WebRTC Screen Sharing"; + homepage = "https://github.com/adamyordan/laplace"; + }; +} |
