forked from
lass.pds.lassul.us/superconfig
This repository has no description
979 B
37 lines
1{ pkgs, ... }:
2let
3 domain = "paint.lassul.us";
4 port = 3092;
5in
6{
7 # WBO collaborative whiteboard. Public like the pad: anyone with the link to
8 # /boards/<name> can draw, boards are kept as JSON in the state dir.
9 systemd.services.whitebophir = {
10 description = "WBO collaborative whiteboard";
11 wantedBy = [ "multi-user.target" ];
12 after = [ "network.target" ];
13 environment = {
14 PORT = toString port;
15 HOST = "127.0.0.1";
16 WBO_HISTORY_DIR = "/var/lib/whitebophir";
17 };
18 serviceConfig = {
19 ExecStart = "${pkgs.whitebophir}/bin/whitebophir";
20 DynamicUser = true;
21 StateDirectory = "whitebophir";
22 Restart = "always";
23 MemoryMax = "1G";
24 };
25 };
26
27 services.nginx.virtualHosts.${domain} = {
28 enableACME = true;
29 forceSSL = true;
30 locations."/" = {
31 proxyPass = "http://127.0.0.1:${toString port}";
32 recommendedProxySettings = true;
33 # socket.io
34 proxyWebsockets = true;
35 };
36 };
37}