[review request] iPhone semi-automount module

Greetings. I’ve got a need to transfer files from iPhone and found that NixOS doesn’t provide a module for that. I present here an example of such module:

Current problems with this module, which make it impossible to contribute upstream:

  • iPhone pairing is two step process. First your run pairing, it fails, you accept dialog on iPhone and run pairing second time. Probably there should be a messagebox shown “Please confirm pairing” between two pairings
  • The pair/mount job should run on device plug-in, probably some udev rule? Why should you run pairing manually?
  • fuse filesystem should unmount automagically on device unplug
  • which folder should iPhone mount to? Probably something in /run/media/UID/, but how to refer to it?
  • What is implemented is clearly a user service, but how to rewrite it as user service?

Suggestions welcome!