{ pkgs, config, lib, ... }: with lib; let cfg = config.modules.hardware.ios; in { options.modules.hardware.ios = { enable = mkEnableOption "Enable tethering with iOS devices"; sideload = mkEnableOption "Additionally, enable sideloading through Althea"; }; config = mkIf cfg.enable { services.usbmuxd.enable = true; services.usbmuxd.package = pkgs.usbmuxd2; environment.systemPackages = with pkgs; [ libimobiledevice ifuse ]; hm.home.packages = optional cfg.sideload pkgs.my.althea; }; }