aboutsummaryrefslogtreecommitdiff
path: root/modules/laplace/default.nix
blob: 57a27f00ce4792c3bd33b5bfa726499ec1d4014c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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" ];
    };
  };
}