Commit a9e3b1c0 authored by Jonas Heinrich's avatar Jonas Heinrich Committed by Yt
Browse files

nixos/usbmuxd: Ability to change package

parent a518020c
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -209,6 +209,16 @@
          <link linkend="opt-services.opensnitch.rules">services.opensnitch.rules</link>
        </para>
      </listitem>
      <listitem>
        <para>
          The module <literal>usbmuxd</literal> now has the ability to
          change the package used by the daemon. In case you’re
          experiencing issues with <literal>usbmuxd</literal> you can
          try an alternative program like <literal>usbmuxd2</literal>.
          Available as
          <link linkend="opt-services.usbmuxd.package">services.usbmuxd.package</link>
        </para>
      </listitem>
      <listitem>
        <para>
          <literal>services.mastodon</literal> gained a tootctl wrapped
+2 −0
Original line number Diff line number Diff line
@@ -61,6 +61,8 @@ In addition to numerous new and upgraded packages, this release has the followin

- The module for the application firewall `opensnitch` got the ability to configure rules. Available as [services.opensnitch.rules](#opt-services.opensnitch.rules)

- The module `usbmuxd` now has the ability to change the package used by the daemon. In case you're experiencing issues with `usbmuxd` you can try an alternative program like `usbmuxd2`. Available as [services.usbmuxd.package](#opt-services.usbmuxd.package)

- `services.mastodon` gained a tootctl wrapped named `mastodon-tootctl` similar to `nextcloud-occ` which can be executed from any user and switches to the configured mastodon user with sudo and sources the environment variables.

- The `dnsmasq` service now takes configuration via the
+11 −1
Original line number Diff line number Diff line
@@ -13,6 +13,7 @@ in

{
  options.services.usbmuxd = {

    enable = mkOption {
      type = types.bool;
      default = false;
@@ -39,6 +40,15 @@ in
        The group usbmuxd should use to run after startup.
      '';
    };

    package = mkOption {
      type = types.package;
      default = pkgs.usbmuxd;
      defaultText = literalExpression "pkgs.usbmuxd";
      description = lib.mdDoc "Which package to use for the usbmuxd daemon.";
      relatedPackages = [ "usbmuxd" "usbmuxd2" ];
    };

  };

  config = mkIf cfg.enable {
@@ -68,7 +78,7 @@ in
        # Trigger the udev rule manually. This doesn't require replugging the
        # device when first enabling the option to get it to work
        ExecStartPre = "${pkgs.udev}/bin/udevadm trigger -s usb -a idVendor=${apple}";
        ExecStart = "${pkgs.usbmuxd}/bin/usbmuxd -U ${cfg.user} -f";
        ExecStart = "${cfg.package}/bin/usbmuxd -U ${cfg.user} -v";
      };
    };