11 cfg = config.services.whitebophir;
15 services.whitebophir = {
16 enable = mkEnableOption "whitebophir, an online collaborative whiteboard server (persistent state will be maintained under {file}`/var/lib/whitebophir`)";
18 package = mkPackageOption pkgs "whitebophir" { };
20 listenAddress = mkOption {
23 description = "Address to listen on (use 0.0.0.0 to allow access from any address).";
29 description = "Port to bind to.";
34 config = mkIf cfg.enable {
35 systemd.services.whitebophir = {
36 description = "Whitebophir Service";
37 wantedBy = [ "multi-user.target" ];
38 after = [ "network.target" ];
40 PORT = toString cfg.port;
41 HOST = toString cfg.listenAddress;
42 WBO_HISTORY_DIR = "/var/lib/whitebophir";
47 ExecStart = "${cfg.package}/bin/whitebophir";
49 StateDirectory = "whitebophir";