summaryrefslogtreecommitdiff
path: root/module.nix
blob: c6f43ce8f2a53f6bf354a585ae76f4b4b43f1c94 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
{ options, lib, config, pkgs, modulesPath }:
let
  cfg = config.services.ibb;
in {
   options.services.ibb.enable = lib.mkEnableOption "Enable the IBB service";
   config = lib.mkIf cfg.enable {
     systemd.services.ibb = {
       path = with pkgs; [ ibb bash ];
       wantedBy = [ "multi-user.target" ];
       script = ''
	 ./bin/ibb
       '';
       description = ''
         https://ibb.buildmindful.com
       '';
       serviceConfig = {
         WorkingDirectory=pkgs.ibb;
	 KillSignal="INT";
	 Type = "simple";
         Restart = "on-abort";
         RestartSec = "10";
      };
    };
  };
}