aboutsummaryrefslogtreecommitdiff
path: root/modules/laplace
diff options
context:
space:
mode:
Diffstat (limited to 'modules/laplace')
-rw-r--r--modules/laplace/default.nix27
-rw-r--r--modules/laplace/package.nix29
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";
+ };
+}