{ 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 config.etherpad.news2kindle.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" ]; }; }; }