diff options
author | Nick <nicksima@gmail.com> | 2019-01-27 10:12:06 -0800 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2019-01-28 12:07:42 -0800 |
commit | 0d2ce4770faedf73cbcba947a8485e9ffa6ccf03 (patch) | |
tree | 30072af00f4d4a1dccbfa975bb58133931aac368 /module.nix | |
parent | 14cfbba271513ebc7ffe7c604daea784acecbc20 (diff) |
Add a module.nix
Diffstat (limited to 'module.nix')
-rw-r--r-- | module.nix | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/module.nix b/module.nix new file mode 100644 index 0000000..c6f43ce --- /dev/null +++ b/module.nix @@ -0,0 +1,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"; + }; + }; + }; +}
\ No newline at end of file |