···11+{ config, lib, pkgs, ... }:
22+33+with lib;
44+55+{
66+ options.services.usbmuxd.enable = mkOption {
77+ type = types.bool;
88+ default = false;
99+ description = ''
1010+ Enable the usbmuxd ("USB multiplexing daemon") service. This daemon is in
1111+ charge of multiplexing connections over USB to an iOS device. This is
1212+ needed for transferring data from and to iOS devices (see ifuse). Also
1313+ this may enable plug-n-play tethering for iPhones.
1414+ '';
1515+ };
1616+1717+ config = mkIf config.services.usbmuxd.enable {
1818+ systemd.services.usbmuxd = {
1919+ description = "usbmuxd";
2020+ wantedBy = [ "multi-user.target" ];
2121+ unitConfig.Documentation = "man:usbmuxd(8)";
2222+ serviceConfig.ExecStart = "${pkgs.usbmuxd}/bin/usbmuxd -f";
2323+ };
2424+ };
2525+}