···1+{ config, lib, pkgs, ... }:
2+3+with lib;
4+5+{
6+ options.services.usbmuxd.enable = mkOption {
7+ type = types.bool;
8+ default = false;
9+ description = ''
10+ Enable the usbmuxd ("USB multiplexing daemon") service. This daemon is in
11+ charge of multiplexing connections over USB to an iOS device. This is
12+ needed for transferring data from and to iOS devices (see ifuse). Also
13+ this may enable plug-n-play tethering for iPhones.
14+ '';
15+ };
16+17+ config = mkIf config.services.usbmuxd.enable {
18+ systemd.services.usbmuxd = {
19+ description = "usbmuxd";
20+ wantedBy = [ "multi-user.target" ];
21+ unitConfig.Documentation = "man:usbmuxd(8)";
22+ serviceConfig.ExecStart = "${pkgs.usbmuxd}/bin/usbmuxd -f";
23+ };
24+ };
25+}