Skip to content
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

nixos/pipewire: add configPackages options #282377

Merged
merged 4 commits into from Feb 26, 2024

Conversation

hcsch
Copy link
Contributor

@hcsch hcsch commented Jan 20, 2024

Description of changes

Added configPackages options to both services.pipewire and services.pipewire.wireplumber. Packages specified in these options have their relevant files (e.g. share/pipewire/pipewire.conf.d/*) combined in store path generated by pkgs.buildEnv and linked to /etc/.
Pipewire extraConfig options also get added to this store path in the appropriate locations.

Added extraLv2Packages options to the options of both services for packages providing lv2 plugins required by filter chains the user set up in their pipewire/wireplumber config files. These get added to the LV2_PATH of the service they were specified for. In addition, packages in configPackages can specify passthru.requiredLv2Packages to have them included in the path as well.

In the case of wireplumber, added config and lv2 packages get added for pipewire as well, since config packages for wireplumber are likely to have config files for pipewire as well.

For now my main use case for this is asahi-audio (my setup for that is not yet clean enough to upstream), but I'm sure that as time goes on, other packages will pop up to configure filter chains or similar things. With these options, adding them to nixpkgs should be easy and using them should be easy for users as well.

Things done

  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)
    • sandbox = relaxed
    • sandbox = true
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
  • Fits CONTRIBUTING.md.

I've tested these changes locally with my yet to be upstreamed asahi-audio package and the config files are put in the right places, and lv2 packages are found by wireplumber/pipewire. The existing nixos default config files for pipewire are also present.


Add a 👍 reaction to pull requests you find important.

@hcsch
Copy link
Contributor Author

hcsch commented Jan 20, 2024

Should I document the attribute in passthru somewhere for discoverabiltiy? If so, where is the most appropriate place for that?

@nixos-discourse
Copy link

This pull request has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/asahi-audio-on-nixos-lv2-path-management/38569/4

@hcsch hcsch force-pushed the pipewire-wireplumber-config-packages branch from 1aeaa88 to 9c00064 Compare January 20, 2024 17:11
@hcsch
Copy link
Contributor Author

hcsch commented Jan 20, 2024

Forgot some mentions of the not yet upstreamed asahi-audio package in the option descriptions/examples. Those have been removed with the force-push

@hcsch
Copy link
Contributor Author

hcsch commented Jan 20, 2024

@tpwrules If I'm right, you set up asahi-audio for https://github.com/tpwrules/nixos-apple-silicon. I'd be happy to hear if this looks useful to you :)

@tpwrules
Copy link
Contributor

@K900 we had discussed something along these lines on Matrix, what do you think? I don't have any opinion yet.

@hcsch hcsch force-pushed the pipewire-wireplumber-config-packages branch from 9c00064 to 3675056 Compare February 1, 2024 06:15
@hcsch
Copy link
Contributor Author

hcsch commented Feb 1, 2024

I moved some definitions around in the pipewire module to make the git diff a bit more readable. Adding a let ... in in the config definition and having to change the indentation accordingly kinda made the diff a bit messy. Hopefully this way it's nicer to review

Edit: Accidentally duplicated some systemd service settings while rebasing. Fixed that again just now

@hcsch hcsch force-pushed the pipewire-wireplumber-config-packages branch from 3675056 to 09d611f Compare February 1, 2024 06:20
@K900
Copy link
Contributor

K900 commented Feb 8, 2024

Do we really need separate options for LV2 plugins on Wireplumber and Pipewire? I'm not even sure if both need to be aware of it.

@hcsch hcsch force-pushed the pipewire-wireplumber-config-packages branch from 09d611f to d461252 Compare February 9, 2024 11:42
@hcsch
Copy link
Contributor Author

hcsch commented Feb 9, 2024

You're totally right. I think I just got a bit confused about what requires what to work when I wrote this. I was getting some errors in wireplumber about not being able to find the lv2 plugins, or something along those lines, but all docs (that I found) described this as a feature of pipewire, not wireplumber. And I kinda remember getting some errors from pipewire too, but that might've been due to other issue earlier when I was writing these changes, when I was having some other issues as well.
Anyways, I've taken out the LV2 config options / environment variables from the pipewire module and tested the setup again on my nixos (with nixpkgs at nixos-unstable) and it seemed to worked just fine.

Copy link
Contributor

@K900 K900 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks pretty good

@hcsch hcsch force-pushed the pipewire-wireplumber-config-packages branch from d461252 to f7d5fe6 Compare February 23, 2024 06:58
@hcsch hcsch force-pushed the pipewire-wireplumber-config-packages branch from f7d5fe6 to e722c56 Compare February 23, 2024 07:59
@K900 K900 merged commit 92b9d11 into NixOS:master Feb 26, 2024
20 checks passed
@K900
Copy link
Contributor

K900 commented Feb 26, 2024

OK let's send it.

K900 added a commit to K900/nixpkgs that referenced this pull request Feb 26, 2024
Follow-up NixOS#282377.

Some packages may want to load LV2 plugins directly from PipeWire config instead, so add another option to accomodate those.
hcsch added a commit to hcsch/nixpkgs that referenced this pull request Mar 19, 2024
Follow-up to NixOS#282377. NixOS#282377 broke `environment.etc."wireplumber<...>"`,
however WirePlumber did not yet have `extraConfig` style options for
configuring it ergonomically outside of `environment.etc`. This has
caused issues for people who had custom config files for WirePlumber, as
having to create a config package just to edit some settings is not as
ergonomic or discoverable as with a proper `extraConfig` style option.

This commit fixes this issue by adding three new options:
 * `extraConfig` for WirePlumber 0.5 `.conf` files. The option takes Nix
   attrsets, converts them into JSON and places them in
   `/etc/wireplumber/wireplumber.conf.d`. Here rules for ALSA and
   Bluetooth devices, stream settings, log-levels and the like can be
   set.
 * `extraScripts` for lua scripts to be referenced by configuration
   files. These get put in `/etc/wireplumber/scripts`.
hcsch added a commit to hcsch/nixpkgs that referenced this pull request Mar 19, 2024
Follow-up to NixOS#282377. NixOS#282377 broke `environment.etc."wireplumber<...>"`,
however WirePlumber did not yet have `extraConfig` style options for
configuring it ergonomically outside of `environment.etc`. This has
caused issues for people who had custom config files for WirePlumber, as
having to create a config package just to edit some settings is not as
ergonomic or discoverable as with a proper `extraConfig` style option.

This commit fixes this issue by adding three new options:
 * `extraConfig` for WirePlumber 0.5 `.conf` files. The option takes Nix
   attrsets, converts them into JSON and places them in
   `/etc/wireplumber/wireplumber.conf.d`. Here rules for ALSA and
   Bluetooth devices, stream settings, log-levels and the like can be
   set.
 * `extraScripts` for lua scripts to be referenced by configuration
   files. These get put in `/etc/wireplumber/scripts`.
hcsch added a commit to hcsch/nixpkgs that referenced this pull request Mar 19, 2024
Follow-up to NixOS#282377. NixOS#282377 broke `environment.etc."wireplumber<...>"`,
however WirePlumber did not yet have `extraConfig` style options for
configuring it ergonomically outside of `environment.etc`. This has
caused issues for people who had custom config files for WirePlumber, as
having to create a config package just to edit some settings is not as
ergonomic or discoverable as with a proper `extraConfig` style option.

This commit fixes this issue by adding three new options:
 * `extraConfig` for WirePlumber 0.5 `.conf` files. The option takes Nix
   attrsets, converts them into JSON and places them in
   `/etc/wireplumber/wireplumber.conf.d`. Here rules for ALSA and
   Bluetooth devices, stream settings, log-levels and the like can be
   set.
 * `extraScripts` for lua scripts to be referenced by configuration
   files. These get put in `/etc/wireplumber/scripts`.
hcsch added a commit to hcsch/nixpkgs that referenced this pull request Mar 19, 2024
Follow-up to NixOS#282377. NixOS#282377 broke `environment.etc."wireplumber<...>"`,
however WirePlumber did not yet have `extraConfig` style options for
configuring it ergonomically outside of `environment.etc`. This has
caused issues for people who had custom config files for WirePlumber, as
having to create a config package just to edit some settings is not as
ergonomic or discoverable as with a proper `extraConfig` style option.

This commit fixes this issue by adding three new options:
 * `extraConfig` for WirePlumber 0.5 `.conf` files. The option takes Nix
   attrsets, converts them into JSON and places them in
   `/etc/wireplumber/wireplumber.conf.d`. Here rules for ALSA and
   Bluetooth devices, stream settings, log-levels and the like can be
   set.
 * `extraScripts` for lua scripts to be referenced by configuration
   files. These get put in `/etc/wireplumber/scripts`.
hcsch added a commit to hcsch/nixpkgs that referenced this pull request Mar 19, 2024
Follow-up to NixOS#282377. NixOS#282377 broke `environment.etc."wireplumber<...>"`,
however WirePlumber did not yet have `extraConfig` style options for
configuring it ergonomically outside of `environment.etc`. This has
caused issues for people who had custom config files for WirePlumber, as
having to create a config package just to edit some settings is not as
ergonomic or discoverable as with a proper `extraConfig` style option.

This commit fixes this issue by adding three new options:
 * `extraConfig` for WirePlumber 0.5 `.conf` files. The option takes Nix
   attrsets, converts them into JSON and places them in
   `/etc/wireplumber/wireplumber.conf.d`. Here rules for ALSA and
   Bluetooth devices, stream settings, log-levels and the like can be
   set.
 * `extraScripts` for lua scripts to be referenced by configuration
   files. These get put in `/etc/wireplumber/scripts`.
hcsch added a commit to hcsch/nixpkgs that referenced this pull request Mar 19, 2024
Follow-up to NixOS#282377. NixOS#282377 broke `environment.etc."wireplumber<...>"`,
however WirePlumber did not yet have `extraConfig` style options for
configuring it ergonomically outside of `environment.etc`. This has
caused issues for people who had custom config files for WirePlumber, as
having to create a config package just to edit some settings is not as
ergonomic or discoverable as with a proper `extraConfig` style option.

This commit fixes this issue by adding three new options:
 * `extraConfig` for WirePlumber 0.5 `.conf` files. The option takes Nix
   attrsets, converts them into JSON and places them in
   `/etc/wireplumber/wireplumber.conf.d`. Here rules for ALSA and
   Bluetooth devices, stream settings, log-levels and the like can be
   set.
 * `extraScripts` for lua scripts to be referenced by configuration
   files. These get put in `/etc/wireplumber/scripts`.
hcsch added a commit to hcsch/nixpkgs that referenced this pull request Mar 19, 2024
Follow-up to NixOS#282377. NixOS#282377 broke `environment.etc."wireplumber<...>"`,
however WirePlumber did not yet have `extraConfig` style options for
configuring it ergonomically outside of `environment.etc`. This has
caused issues for people who had custom config files for WirePlumber, as
having to create a config package just to edit some settings is not as
ergonomic or discoverable as with a proper `extraConfig` style option.

This commit fixes this issue by adding three new options:
 * `extraConfig` for WirePlumber 0.5 `.conf` files. The option takes Nix
   attrsets, converts them into JSON and places them in
   `/etc/wireplumber/wireplumber.conf.d`. Here rules for ALSA and
   Bluetooth devices, stream settings, log-levels and the like can be
   set.
 * `extraScripts` for lua scripts to be referenced by configuration
   files. These get put in `/etc/wireplumber/scripts`.
hcsch added a commit to hcsch/nixpkgs that referenced this pull request Mar 19, 2024
Follow-up to NixOS#282377. NixOS#282377 broke `environment.etc."wireplumber<...>"`,
however WirePlumber did not yet have `extraConfig` style options for
configuring it ergonomically outside of `environment.etc`. This has
caused issues for people who had custom config files for WirePlumber, as
having to create a config package just to edit some settings is not as
ergonomic or discoverable as with a proper `extraConfig` style option.

This commit fixes this issue by adding three new options:
 * `extraConfig` for WirePlumber 0.5 `.conf` files. The option takes Nix
   attrsets, converts them into JSON and places them in
   `/etc/wireplumber/wireplumber.conf.d`. Here rules for ALSA and
   Bluetooth devices, stream settings, log-levels and the like can be
   set.
 * `extraScripts` for lua scripts to be referenced by configuration
   files. These get put in `/etc/wireplumber/scripts`.
hcsch added a commit to hcsch/nixpkgs that referenced this pull request Mar 19, 2024
Follow-up to NixOS#282377. NixOS#282377 broke `environment.etc."wireplumber<...>"`,
however WirePlumber did not yet have `extraConfig` style options for
configuring it ergonomically outside of `environment.etc`. This has
caused issues for people who had custom config files for WirePlumber, as
having to create a config package just to edit some settings is not as
ergonomic or discoverable as with a proper `extraConfig` style option.

This commit fixes this issue by adding three new options:
 * `extraConfig` for WirePlumber 0.5 `.conf` files. The option takes Nix
   attrsets, converts them into JSON and places them in
   `/etc/wireplumber/wireplumber.conf.d`. Here rules for ALSA and
   Bluetooth devices, stream settings, log-levels and the like can be
   set.
 * `extraScripts` for lua scripts to be referenced by configuration
   files. These get put in `/etc/wireplumber/scripts`.
hcsch added a commit to hcsch/nixpkgs that referenced this pull request Mar 19, 2024
Follow-up to NixOS#282377. NixOS#282377 broke `environment.etc."wireplumber<...>"`,
however WirePlumber did not yet have `extraConfig` style options for
configuring it ergonomically outside of `environment.etc`. This has
caused issues for people who had custom config files for WirePlumber, as
having to create a config package just to edit some settings is not as
ergonomic or discoverable as with a proper `extraConfig` style option.

This commit fixes this issue by adding three new options:
 * `extraConfig` for WirePlumber 0.5 `.conf` files. The option takes Nix
   attrsets, converts them into JSON and places them in
   `/etc/wireplumber/wireplumber.conf.d`. Here rules for ALSA and
   Bluetooth devices, stream settings, log-levels and the like can be
   set.
 * `extraScripts` for lua scripts to be referenced by configuration
   files. These get put in `/etc/wireplumber/scripts`.
hcsch added a commit to hcsch/nixpkgs that referenced this pull request Mar 19, 2024
Follow-up to NixOS#282377. NixOS#282377 broke `environment.etc."wireplumber<...>"`,
however WirePlumber did not yet have `extraConfig` style options for
configuring it ergonomically outside of `environment.etc`. This has
caused issues for people who had custom config files for WirePlumber, as
having to create a config package just to edit some settings is not as
ergonomic or discoverable as with a proper `extraConfig` style option.

This commit fixes this issue by adding three new options:
 * `extraConfig` for WirePlumber 0.5 `.conf` files. The option takes Nix
   attrsets, converts them into JSON and places them in
   `/etc/wireplumber/wireplumber.conf.d`. Here rules for ALSA and
   Bluetooth devices, stream settings, log-levels and the like can be
   set.
 * `extraScripts` for lua scripts to be referenced by configuration
   files. These get put in `/etc/wireplumber/scripts`.
hcsch added a commit to hcsch/nixpkgs that referenced this pull request Mar 22, 2024
Follow-up to NixOS#282377. NixOS#282377 broke `environment.etc."wireplumber<...>"`,
however WirePlumber did not yet have `extraConfig` style options for
configuring it ergonomically outside of `environment.etc`. This has
caused issues for people who had custom config files for WirePlumber, as
having to create a config package just to edit some settings is not as
ergonomic or discoverable as with a proper `extraConfig` style option.

This commit fixes this issue by adding three new options:
 * `extraConfig` for WirePlumber 0.5 `.conf` files. The option takes Nix
   attrsets, converts them into JSON and places them in
   `/etc/wireplumber/wireplumber.conf.d`. Here rules for ALSA and
   Bluetooth devices, stream settings, log-levels and the like can be
   set.
 * `extraScripts` for lua scripts to be referenced by configuration
   files. These get put in `/etc/wireplumber/scripts`.
hcsch added a commit to hcsch/nixpkgs that referenced this pull request Mar 22, 2024
Follow-up to NixOS#282377. NixOS#282377 broke `environment.etc."wireplumber<...>"`,
however WirePlumber did not yet have `extraConfig` style options for
configuring it ergonomically outside of `environment.etc`. This has
caused issues for people who had custom config files for WirePlumber, as
having to create a config package just to edit some settings is not as
ergonomic or discoverable as with a proper `extraConfig` style option.

This commit fixes this issue by adding three new options:
 * `extraConfig` for WirePlumber 0.5 `.conf` files. The option takes Nix
   attrsets, converts them into JSON and places them in
   `/etc/wireplumber/wireplumber.conf.d`. Here rules for ALSA and
   Bluetooth devices, stream settings, log-levels and the like can be
   set.
 * `extraScripts` for lua scripts to be referenced by configuration
   files. These get put in `/etc/wireplumber/scripts`.
hcsch added a commit to hcsch/nixpkgs that referenced this pull request Mar 28, 2024
Follow-up to NixOS#282377. NixOS#282377 broke `environment.etc."wireplumber<...>"`,
however WirePlumber did not yet have `extraConfig` style options for
configuring it ergonomically outside of `environment.etc`. This has
caused issues for people who had custom config files for WirePlumber, as
having to create a config package just to edit some settings is not as
ergonomic or discoverable as with a proper `extraConfig` style option.

This commit fixes this issue by adding three new options:
 * `extraConfig` for WirePlumber 0.5 `.conf` files. The option takes Nix
   attrsets, converts them into JSON and places them in
   `/etc/wireplumber/wireplumber.conf.d`. Here rules for ALSA and
   Bluetooth devices, stream settings, log-levels and the like can be
   set.
 * `extraScripts` for lua scripts to be referenced by configuration
   files. These get put in `/etc/wireplumber/scripts`.
hcsch added a commit to hcsch/nixpkgs that referenced this pull request Mar 29, 2024
Follow-up to NixOS#282377. NixOS#282377 broke `environment.etc."wireplumber<...>"`,
however WirePlumber did not yet have `extraConfig` style options for
configuring it ergonomically outside of `environment.etc`. This has
caused issues for people who had custom config files for WirePlumber, as
having to create a config package just to edit some settings is not as
ergonomic or discoverable as with a proper `extraConfig` style option.

This commit fixes this issue by adding three new options:
 * `extraConfig` for WirePlumber 0.5 `.conf` files. The option takes Nix
   attrsets, converts them into JSON and places them in
   `/etc/wireplumber/wireplumber.conf.d`. Here rules for ALSA and
   Bluetooth devices, stream settings, log-levels and the like can be
   set.
 * `extraScripts` for lua scripts to be referenced by configuration
   files. These get put in `/etc/wireplumber/scripts`.
hcsch added a commit to hcsch/nixpkgs that referenced this pull request Mar 30, 2024
Follow-up to NixOS#282377. NixOS#282377 broke `environment.etc."wireplumber<...>"`,
however WirePlumber did not yet have `extraConfig` style options for
configuring it ergonomically outside of `environment.etc`. This has
caused issues for people who had custom config files for WirePlumber, as
having to create a config package just to edit some settings is not as
ergonomic or discoverable as with a proper `extraConfig` style option.

This commit fixes this issue by adding three new options:
 * `extraConfig` for WirePlumber 0.5 `.conf` files. The option takes Nix
   attrsets, converts them into JSON and places them in
   `/etc/wireplumber/wireplumber.conf.d`. Here rules for ALSA and
   Bluetooth devices, stream settings, log-levels and the like can be
   set.
 * `extraScripts` for lua scripts to be referenced by configuration
   files. These get put in `/etc/wireplumber/scripts`.
hcsch added a commit to hcsch/nixpkgs that referenced this pull request Apr 6, 2024
Follow-up to NixOS#282377. NixOS#282377 broke `environment.etc."wireplumber<...>"`,
however WirePlumber did not yet have `extraConfig` style options for
configuring it ergonomically outside of `environment.etc`. This has
caused issues for people who had custom config files for WirePlumber, as
having to create a config package just to edit some settings is not as
ergonomic or discoverable as with a proper `extraConfig` style option.

This commit fixes this issue by adding three new options:
 * `extraConfig` for WirePlumber 0.5 `.conf` files. The option takes Nix
   attrsets, converts them into JSON and places them in
   `/etc/wireplumber/wireplumber.conf.d`. Here rules for ALSA and
   Bluetooth devices, stream settings, log-levels and the like can be
   set.
 * `extraScripts` for lua scripts to be referenced by configuration
   files. These get put in `/etc/wireplumber/scripts`.
hcsch added a commit to hcsch/nixpkgs that referenced this pull request Apr 6, 2024
Follow-up to NixOS#282377. NixOS#282377 broke `environment.etc."wireplumber<...>"`,
however WirePlumber did not yet have `extraConfig` style options for
configuring it ergonomically outside of `environment.etc`. This has
caused issues for people who had custom config files for WirePlumber, as
having to create a config package just to edit some settings is not as
ergonomic or discoverable as with a proper `extraConfig` style option.

This commit fixes this issue by adding three new options:
 * `extraConfig` for WirePlumber 0.5 `.conf` files. The option takes Nix
   attrsets, converts them into JSON and places them in
   `/etc/wireplumber/wireplumber.conf.d`. Here rules for ALSA and
   Bluetooth devices, stream settings, log-levels and the like can be
   set.
 * `extraScripts` for lua scripts to be referenced by configuration
   files. These get put in `/etc/wireplumber/scripts`.
hcsch added a commit to hcsch/nixpkgs that referenced this pull request Apr 6, 2024
Follow-up to NixOS#282377. NixOS#282377 broke `environment.etc."wireplumber<...>"`,
however WirePlumber did not yet have `extraConfig` style options for
configuring it ergonomically outside of `environment.etc`. This has
caused issues for people who had custom config files for WirePlumber, as
having to create a config package just to edit some settings is not as
ergonomic or discoverable as with a proper `extraConfig` style option.

This commit fixes this issue by adding three new options:
 * `extraConfig` for WirePlumber 0.5 `.conf` files. The option takes Nix
   attrsets, converts them into JSON and places them in
   `/etc/wireplumber/wireplumber.conf.d`. Here rules for ALSA and
   Bluetooth devices, stream settings, log-levels and the like can be
   set.
 * `extraScripts` for lua scripts to be referenced by configuration
   files. These get put in `/etc/wireplumber/scripts`.
hcsch added a commit to hcsch/nixpkgs that referenced this pull request Apr 6, 2024
Follow-up to NixOS#282377. NixOS#282377 broke `environment.etc."wireplumber<...>"`,
however WirePlumber did not yet have `extraConfig` style options for
configuring it ergonomically outside of `environment.etc`. This has
caused issues for people who had custom config files for WirePlumber, as
having to create a config package just to edit some settings is not as
ergonomic or discoverable as with a proper `extraConfig` style option.

This commit fixes this issue by adding three new options:
 * `extraConfig` for WirePlumber 0.5 `.conf` files. The option takes Nix
   attrsets, converts them into JSON and places them in
   `/etc/wireplumber/wireplumber.conf.d`. Here rules for ALSA and
   Bluetooth devices, stream settings, log-levels and the like can be
   set.
 * `extraScripts` for lua scripts to be referenced by configuration
   files. These get put in `/etc/wireplumber/scripts`.
hcsch added a commit to hcsch/nixpkgs that referenced this pull request Apr 6, 2024
Follow-up to NixOS#282377. NixOS#282377 broke `environment.etc."wireplumber<...>"`,
however WirePlumber did not yet have `extraConfig` style options for
configuring it ergonomically outside of `environment.etc`. This has
caused issues for people who had custom config files for WirePlumber, as
having to create a config package just to edit some settings is not as
ergonomic or discoverable as with a proper `extraConfig` style option.

This commit fixes this issue by adding three new options:
 * `extraConfig` for WirePlumber 0.5 `.conf` files. The option takes Nix
   attrsets, converts them into JSON and places them in
   `/etc/wireplumber/wireplumber.conf.d`. Here rules for ALSA and
   Bluetooth devices, stream settings, log-levels and the like can be
   set.
 * `extraScripts` for lua scripts to be referenced by configuration
   files. These get put in `/etc/wireplumber/scripts`.
hcsch added a commit to hcsch/nixpkgs that referenced this pull request Apr 6, 2024
Follow-up to NixOS#282377. NixOS#282377 broke `environment.etc."wireplumber<...>"`,
however WirePlumber did not yet have `extraConfig` style options for
configuring it ergonomically outside of `environment.etc`. This has
caused issues for people who had custom config files for WirePlumber, as
having to create a config package just to edit some settings is not as
ergonomic or discoverable as with a proper `extraConfig` style option.

This commit fixes this issue by adding three new options:
 * `extraConfig` for WirePlumber 0.5 `.conf` files. The option takes Nix
   attrsets, converts them into JSON and places them in
   `/etc/wireplumber/wireplumber.conf.d`. Here rules for ALSA and
   Bluetooth devices, stream settings, log-levels and the like can be
   set.
 * `extraScripts` for lua scripts to be referenced by configuration
   files. These get put in `/etc/wireplumber/scripts`.
hcsch added a commit to hcsch/nixpkgs that referenced this pull request Apr 6, 2024
Follow-up to NixOS#282377. NixOS#282377 broke `environment.etc."wireplumber<...>"`,
however WirePlumber did not yet have `extraConfig` style options for
configuring it ergonomically outside of `environment.etc`. This has
caused issues for people who had custom config files for WirePlumber, as
having to create a config package just to edit some settings is not as
ergonomic or discoverable as with a proper `extraConfig` style option.

This commit fixes this issue by adding three new options:
 * `extraConfig` for WirePlumber 0.5 `.conf` files. The option takes Nix
   attrsets, converts them into JSON and places them in
   `/etc/wireplumber/wireplumber.conf.d`. Here rules for ALSA and
   Bluetooth devices, stream settings, log-levels and the like can be
   set.
 * `extraScripts` for lua scripts to be referenced by configuration
   files. These get put in `/etc/wireplumber/scripts`.
hcsch added a commit to hcsch/nixpkgs that referenced this pull request Apr 6, 2024
Follow-up to NixOS#282377. NixOS#282377 broke `environment.etc."wireplumber<...>"`,
however WirePlumber did not yet have `extraConfig` style options for
configuring it ergonomically outside of `environment.etc`. This has
caused issues for people who had custom config files for WirePlumber, as
having to create a config package just to edit some settings is not as
ergonomic or discoverable as with a proper `extraConfig` style option.

This commit fixes this issue by adding three new options:
 * `extraConfig` for WirePlumber 0.5 `.conf` files. The option takes Nix
   attrsets, converts them into JSON and places them in
   `/etc/wireplumber/wireplumber.conf.d`. Here rules for ALSA and
   Bluetooth devices, stream settings, log-levels and the like can be
   set.
 * `extraScripts` for lua scripts to be referenced by configuration
   files. These get put in `/etc/wireplumber/scripts`.
hcsch added a commit to hcsch/nixpkgs that referenced this pull request Apr 20, 2024
Follow-up to NixOS#282377. NixOS#282377 broke `environment.etc."wireplumber<...>"`,
however WirePlumber did not yet have `extraConfig` style options for
configuring it ergonomically outside of `environment.etc`. This has
caused issues for people who had custom config files for WirePlumber, as
having to create a config package just to edit some settings is not as
ergonomic or discoverable as with a proper `extraConfig` style option.

This commit fixes this issue by adding three new options:
 * `extraConfig` for WirePlumber 0.5 `.conf` files. The option takes Nix
   attrsets, converts them into JSON and places them in
   `/etc/wireplumber/wireplumber.conf.d`. Here rules for ALSA and
   Bluetooth devices, stream settings, log-levels and the like can be
   set.
 * `extraScripts` for lua scripts to be referenced by configuration
   files. These get put in `/etc/wireplumber/scripts`.
hcsch added a commit to hcsch/nixpkgs that referenced this pull request Apr 20, 2024
Follow-up to NixOS#282377. NixOS#282377 broke `environment.etc."wireplumber<...>"`,
however WirePlumber did not yet have `extraConfig` style options for
configuring it ergonomically outside of `environment.etc`. This has
caused issues for people who had custom config files for WirePlumber, as
having to create a config package just to edit some settings is not as
ergonomic or discoverable as with a proper `extraConfig` style option.

This commit fixes this issue by adding three new options:
 * `extraConfig` for WirePlumber 0.5 `.conf` files. The option takes Nix
   attrsets, converts them into JSON and places them in
   `/etc/wireplumber/wireplumber.conf.d`. Here rules for ALSA and
   Bluetooth devices, stream settings, log-levels and the like can be
   set.
 * `extraScripts` for lua scripts to be referenced by configuration
   files. These get put in `/etc/wireplumber/scripts`.
hcsch added a commit to hcsch/nixpkgs that referenced this pull request Apr 21, 2024
Follow-up to NixOS#282377. NixOS#282377 broke `environment.etc."wireplumber<...>"`,
however WirePlumber did not yet have `extraConfig` style options for
configuring it ergonomically outside of `environment.etc`. This has
caused issues for people who had custom config files for WirePlumber, as
having to create a config package just to edit some settings is not as
ergonomic or discoverable as with a proper `extraConfig` style option.

This commit fixes this issue by adding the `extraConfig` option for
additional config file and the `extraScripts` option for additional
scripts to be used by config files.

With WirePlumber 0.5 it is possible to supply config files and scripts
via the `XDG_DATA_DIRS` variable to the WirePlumber daemon. This is how
the new options and with this change also the `configPackages` option
expose their files to the daemon. This way
`environment.etc."wireplumber"` works again for user configuration and
breakage of old configs from 23.11 to 24.05 should be limited to those
caused by the change in the config format from WirePlumber 0.4 to 0.5.
hcsch added a commit to hcsch/nixpkgs that referenced this pull request Apr 21, 2024
Follow-up to NixOS#282377. NixOS#282377 broke `environment.etc."wireplumber<...>"`,
however WirePlumber did not yet have `extraConfig` style options for
configuring it ergonomically outside of `environment.etc`. This has
caused issues for people who had custom config files for WirePlumber, as
having to create a config package just to edit some settings is not as
ergonomic or discoverable as with a proper `extraConfig` style option.

This commit fixes this issue by adding the `extraConfig` option for
additional config file and the `extraScripts` option for additional
scripts to be used by config files.

With WirePlumber 0.5 it is possible to supply config files and scripts
via the `XDG_DATA_DIRS` variable to the WirePlumber daemon. This is how
the new options and with this change also the `configPackages` option
expose their files to the daemon. This way
`environment.etc."wireplumber"` works again for user configuration and
breakage of old configs from 23.11 to 24.05 should be limited to those
caused by the change in the config format from WirePlumber 0.4 to 0.5.
hcsch added a commit to hcsch/nixpkgs that referenced this pull request Apr 24, 2024
Follow-up to NixOS#282377. NixOS#282377 broke `environment.etc."wireplumber<...>"`,
however WirePlumber did not yet have `extraConfig` style options for
configuring it ergonomically outside of `environment.etc`. This has
caused issues for people who had custom config files for WirePlumber, as
having to create a config package just to edit some settings is not as
ergonomic or discoverable as with a proper `extraConfig` style option.

This commit fixes this issue by adding the `extraConfig` option for
additional config file and the `extraScripts` option for additional
scripts to be used by config files.

With WirePlumber 0.5 it is possible to supply config files and scripts
via the `XDG_DATA_DIRS` variable to the WirePlumber daemon. This is how
the new options and with this change also the `configPackages` option
expose their files to the daemon. This way
`environment.etc."wireplumber"` works again for user configuration and
breakage of old configs from 23.11 to 24.05 should be limited to those
caused by the change in the config format from WirePlumber 0.4 to 0.5.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet