Additional scripts for WirePlumber to be used by configuration files.
Every item in this attrset becomes a separate lua file with the path relative to the scripts
directory specified in the name of the item. The scripts get passed to the WirePlumber service via the XDG_DATA_DIRS
variable. Scripts specified here are preferred over those shipped with WirePlumber if they occupy the same relative path.
For a script to be loaded, it needs to be specified as part of a component, and that component needs to be required by an active profile (e.g. main
). Components can be defined in config files either via extraConfig
or configPackages
.
For the hello-world example, you'd have to add the following extraConfig
:
services.pipewire.wireplumber.extraConfig."99-hello-world" = {
"wireplumber.components" = [
{
name = "test/hello-world.lua";
type = "script/lua";
provides = "custom.hello-world";
}
];
"wireplumber.profiles" = {
main = {
"custom.hello-world" = "required";
};
};
};
See also:
Declarations
Type
attribute set of strings concatenated with "\n"
Default
{ }
Example
{
"test/hello-world.lua" = ''
print("Hello, world!")
'';
}