Files
stubbfelnix/module/etherpad/etherpad.nix
2018-01-28 16:59:54 +01:00

38 lines
693 B
Nix

{ config, lib, pkgs, ... }:
{
imports = [ ./etherpad-pkg.nix ];
###### interface
options = {
services.etherpad = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Whether to enable etherpad service.
'';
};
};
};
###### implementation
config = mkIf cfg.enable{
environment.systemPackages = [pkgs.etherpad pkgs.nosdejs];
systemd.services.etherpad = {
description = "etherpad service";
serviceConfig = {
Type = "forking";
ExecStart = "${pkgs.etherpad}/bin/run.sh";
};
wantedBy = [ "multi-user.target" ];
};
};
}