-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
jack module: init #57712
jack module: init #57712
Conversation
@oxij The only sad thing is that I have not found a way to make jack1 work correctly in promiscuous mode: |
Nice! Thanks for putting effort into NixOSifying this.
The first patch LGTM.
The second patch:
- first line of the commit message should be "nixos/jack: init" or similar,
- `extraPackages` option looks superfluous to me,
- `enable32BitAlsaPlugins` should be an option, like `hardware.pulseaudio.support32Bit` and `hardware.opengl.driSupport32Bit`, the current definition is always `true` AFAICS.
- "/home/jackaudio" -> "/var/lib/jackaudio",
- that user needs a static uid, I think,
- you can't use `createHome` there, the home directory needs to be created on every startup if it does not exist, else things are very easy to break.
From the top of my head, see the tor service module for how to do all these user- and home-related things properly.
I would also rename
- `services.jack.pcmPlugin` -> `services.jack.alsa.enable`
- `services.jack.dbusSupport` -> services.jack.dbus.enable`
- both `startupOptions` -> `extraOptions`
as common in other modules.
I would also add `services.jack.a2jmidid.package` option for completeness and put all `jackd` options under `services.jack.jackd` for homogeneity.
The only sad thing is that I have not found a way to make jack1 work correctly in promiscuous mode:
Hm, I had it working before, I'll play with it sometime later.
|
Thank you! Applied changes.
Tor module uses createHome too.
We only have one version and also JACK1 has this functional builtin
Would be really glad if you let me know how to make it work (no necessity to test this PR, just an instruction on how to kick it will be enough). For me only control functions do work with jack1 in promiscuous mode. If I try to use programs there are errors "subgraph starting at ADLplug timed out (subgraph_wait_fd=9, status = 0, state = Triggered, pollret = 0 revents = 0x0)". If I run jack client from the same user as jack server user then everything works. |
Just a hint (hope that helps): The systemd directives |
@Yarny0 applied, thanks! |
@oxij Hi! Did you get a chance to look into jack1 promiscuous mode?
|
@infinisil Thank you for review! Could you please tell me more about moving defaults to config? services.xserver.windowManager.i3.extraPackages = with pkgs;
options.services.xserver.windowManager.i3.extraPackages.default ++ [ spectacle ];
programs.sway.extraPackages = with pkgs;
options.programs.sway.extraPackages.default ++ [ qt5.qtwayland grim ]; Just can't conclude which approach is better:
|
I think if the default makes sense to always be present, because otherwise the module doesn't properly work, then setting it in the config section and requiring the user to use mkForce if they really want to remove that is good. On the other hand for defaults that aren't necessary for the module to work, and users are encouraged to change them, then assigning a default in the option makes more sense. Note that the users could still keep those defaults by assigning their values with (The option value gets determined with a priority system, the assignments of highest priority get merged together to result in the final value, mkForce has high priority, mkOptionDefault very low priority, mkDefault low priority, and without any of those it gets a default priority in the middle). I've written down something similar for NixOS/rfcs#42: https://github.com/Infinisil/rfcs/blob/config-option/rfcs/0042-config-option.md#defaults In this case I'd think putting the defaults in the config section always makes more sense, because these default values encode part of the functionality of this module, and without them certain options couldn't do their thing. The biggest annoyance is that these defaults don't show up in the manual. In the future this might get fixed. |
@infinisil Got it, thank you! I've applied requested changes. |
Hm I just wanted to test this, but I'm not sure it works as intended. I enabled |
@infinisil for test you could start it manually. Automatically it will start only on reboot by udev rule, when real sound card will be added, sound.target is not suitable, since that way loopback device could be initialized before real sound card, and so service will fail. udev rule doesn't trigger on loopback device. |
Could someone finally merge this? |
While I'd have liked for another person to test it, especially somebody who wants to use jack, you seem to have tested it well enough already, so let's merge. |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/firewire-audio-not-working/3976/4 |
Motivation for this change
Currently tested applications with default module settings:
Things done
sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)