@@ -0,0 +1,45 @@
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 <filename>/var/lib/whitebophir</filename>)";
13+ default = pkgs.whitebophir;
14+ defaultText = "pkgs.whitebophir";
15+ type = types.package;
16+ description = "Whitebophir package to use.";
22+ description = "Port to bind to.";
27+ config = mkIf cfg.enable {
28+ systemd.services.whitebophir = {
29+ description = "Whitebophir Service";
30+ wantedBy = [ "multi-user.target" ];
31+ after = [ "network.target" ];
33+ PORT = "${toString cfg.port}";
34+ WBO_HISTORY_DIR = "/var/lib/whitebophir";
39+ ExecStart = "${cfg.package}/bin/whitebophir";
41+ StateDirectory = "whitebophir";