git.iko.soy/typeable/nixpkgs
on master help sign in
nixos/whitebophir: init
46292d7Ingo Blechschmidt
nixos/modules/module-list.nix+1
@@ -900,6 +900,7 @@
900 ./services/web-apps/selfoss.nix
900 ./services/web-apps/selfoss.nix
901 ./services/web-apps/shiori.nix
901 ./services/web-apps/shiori.nix
902 ./services/web-apps/virtlyst.nix
902 ./services/web-apps/virtlyst.nix
903+ ./services/web-apps/whitebophir.nix
903 ./services/web-apps/wordpress.nix
904 ./services/web-apps/wordpress.nix
904 ./services/web-apps/youtrack.nix
905 ./services/web-apps/youtrack.nix
905 ./services/web-apps/zabbix.nix
906 ./services/web-apps/zabbix.nix
nixos/modules/services/web-apps/whitebophir.nixnew file+45
@@ -0,0 +1,45 @@
1+{ config, lib, pkgs, ... }:
2+
3+with lib;
4+
5+let
6+ cfg = config.services.whitebophir;
7+in {
8+ options = {
9+ services.whitebophir = {
10+ enable = mkEnableOption "whitebophir, an online collaborative whiteboard server (persistent state will be maintained under <filename>/var/lib/whitebophir</filename>)";
11+
12+ package = mkOption {
13+ default = pkgs.whitebophir;
14+ defaultText = "pkgs.whitebophir";
15+ type = types.package;
16+ description = "Whitebophir package to use.";
17+ };
18+
19+ port = mkOption {
20+ type = types.port;
21+ default = 5001;
22+ description = "Port to bind to.";
23+ };
24+ };
25+ };
26+
27+ config = mkIf cfg.enable {
28+ systemd.services.whitebophir = {
29+ description = "Whitebophir Service";
30+ wantedBy = [ "multi-user.target" ];
31+ after = [ "network.target" ];
32+ environment = {
33+ PORT = "${toString cfg.port}";
34+ WBO_HISTORY_DIR = "/var/lib/whitebophir";
35+ };
36+
37+ serviceConfig = {
38+ DynamicUser = true;
39+ ExecStart = "${cfg.package}/bin/whitebophir";
40+ Restart = "always";
41+ StateDirectory = "whitebophir";
42+ };
43+ };
44+ };
45+}