1 { config, lib, pkgs, ... }:
6 cfg = config.services.whitebophir;
9 services.whitebophir = {
10 enable = mkEnableOption "whitebophir, an online collaborative whiteboard server (persistent state will be maintained under {file}`/var/lib/whitebophir`)";
12 package = mkPackageOption pkgs "whitebophir" { };
14 listenAddress = mkOption {
17 description = "Address to listen on (use 0.0.0.0 to allow access from any address).";
23 description = "Port to bind to.";
28 config = mkIf cfg.enable {
29 systemd.services.whitebophir = {
30 description = "Whitebophir Service";
31 wantedBy = [ "multi-user.target" ];
32 after = [ "network.target" ];
34 PORT = toString cfg.port;
35 HOST = toString cfg.listenAddress;
36 WBO_HISTORY_DIR = "/var/lib/whitebophir";
41 ExecStart = "${cfg.package}/bin/whitebophir";
43 StateDirectory = "whitebophir";