8 cfg = config.services.goxlr-utility;
13 services.goxlr-utility = {
14 enable = lib.mkOption {
16 type = lib.types.bool;
18 Whether to enable goxlr-utility for controlling your TC-Helicon GoXLR or GoXLR Mini
21 package = lib.mkPackageOption pkgs "goxlr-utility" { };
22 autoStart.xdg = lib.mkOption {
24 type = with lib.types; bool;
26 Start the daemon automatically using XDG autostart.
27 Sets `xdg.autostart.enable = true` if not already enabled.
35 goxlr-autostart = pkgs.stdenv.mkDerivation {
36 name = "autostart-goxlr-daemon";
40 mkdir -p $out/etc/xdg/autostart
41 cp ${cfg.package}/share/applications/goxlr-utility.desktop $out/etc/xdg/autostart/goxlr-daemon.desktop
42 chmod +w $out/etc/xdg/autostart/goxlr-daemon.desktop
43 echo "X-KDE-autostart-phase=2" >> $out/etc/xdg/autostart/goxlr-daemon.desktop
44 substituteInPlace $out/etc/xdg/autostart/goxlr-daemon.desktop \
45 --replace-fail goxlr-launcher goxlr-daemon
49 lib.mkIf config.services.goxlr-utility.enable {
50 services.udev.packages = [ cfg.package ];
52 xdg.autostart.enable = lib.mkIf cfg.autoStart.xdg true;
53 environment.systemPackages = lib.mkIf cfg.autoStart.xdg [
59 meta.maintainers = with lib.maintainers; [ errnoh ];