diff options
Diffstat (limited to 'ibb/module.nix')
-rw-r--r-- | ibb/module.nix | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/ibb/module.nix b/ibb/module.nix new file mode 100644 index 0000000..0242c35 --- /dev/null +++ b/ibb/module.nix @@ -0,0 +1,31 @@ +{ 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"; + }; + }; + }; +} |