mirror of
https://github.com/aviallon/nixos-lib.git
synced 2026-04-06 01:38:06 +00:00
[Desktop/Multimedia] update Pipewire config for NixOS 24.05
Also disable AirPlay support by default, as it is currently broken.
This commit is contained in:
parent
0d5846158f
commit
244c878108
2 changed files with 36 additions and 39 deletions
|
|
@ -36,7 +36,7 @@ in {
|
||||||
default = true;
|
default = true;
|
||||||
example = false;
|
example = false;
|
||||||
};
|
};
|
||||||
airplay.enable = (mkEnableOption "AirPlay sink device support") // { default = true; };
|
airplay.enable = mkEnableOption "AirPlay sink device support";
|
||||||
};
|
};
|
||||||
graphics = {
|
graphics = {
|
||||||
shaderCache = {
|
shaderCache = {
|
||||||
|
|
|
||||||
|
|
@ -72,6 +72,40 @@ in {
|
||||||
ResumeDelay = 4;
|
ResumeDelay = 4;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
services.pipewire.extraConfig.pipewire = {
|
||||||
|
"10-combined-outputs" = {
|
||||||
|
"context.modules" = [
|
||||||
|
{
|
||||||
|
name = "libpipewire-module-combine-stream";
|
||||||
|
args = {
|
||||||
|
"combine.mode" = "sink";
|
||||||
|
"node.name" = "combine_sink";
|
||||||
|
"node.description" = "Sortie combinée";
|
||||||
|
"combine.latency-compensate" = true;
|
||||||
|
"combine.props" = {
|
||||||
|
"audio.position" = [ "FL" "FR" ];
|
||||||
|
};
|
||||||
|
"stream.props" = {};
|
||||||
|
"stream.rules" = [
|
||||||
|
{
|
||||||
|
matches = [
|
||||||
|
# any of the items in matches needs to match, if one does,
|
||||||
|
# actions are emited.
|
||||||
|
{
|
||||||
|
# all keys must match the value. ! negates. ~ starts regex.
|
||||||
|
#node.name = "~alsa_input.*"
|
||||||
|
"media.class" = "Audio/Sink";
|
||||||
|
}
|
||||||
|
];
|
||||||
|
actions.create-stream = {};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
environment.etc = {
|
environment.etc = {
|
||||||
"wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = ''
|
"wireplumber/bluetooth.lua.d/51-bluez-config.lua".text = ''
|
||||||
|
|
@ -82,43 +116,6 @@ in {
|
||||||
["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]"
|
["bluez5.headset-roles"] = "[ hsp_hs hsp_ag hfp_hf hfp_ag ]"
|
||||||
}
|
}
|
||||||
'';
|
'';
|
||||||
"pipewire/pipewire.conf.d/combined-outputs.conf".text = ''
|
|
||||||
context.modules = [
|
|
||||||
{ name = libpipewire-module-combine-stream
|
|
||||||
args = {
|
|
||||||
combine.mode = sink
|
|
||||||
node.name = "combine_sink"
|
|
||||||
node.description = "Sortie combinée"
|
|
||||||
combine.latency-compensate = true
|
|
||||||
combine.props = {
|
|
||||||
audio.position = [ FL FR ]
|
|
||||||
}
|
|
||||||
stream.props = {
|
|
||||||
}
|
|
||||||
stream.rules = [
|
|
||||||
{
|
|
||||||
matches = [
|
|
||||||
# any of the items in matches needs to match, if one does,
|
|
||||||
# actions are emited.
|
|
||||||
{
|
|
||||||
# all keys must match the value. ! negates. ~ starts regex.
|
|
||||||
#node.name = "~alsa_input.*"
|
|
||||||
media.class = "Audio/Sink"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
actions = {
|
|
||||||
create-stream = {
|
|
||||||
#combine.audio.position = [ FL FR ]
|
|
||||||
#audio.position = [ FL FR ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
]
|
|
||||||
'';
|
|
||||||
|
|
||||||
};
|
};
|
||||||
security.rtkit.enable = true; # Real-time support for pipewire
|
security.rtkit.enable = true; # Real-time support for pipewire
|
||||||
|
|
||||||
|
|
@ -135,7 +132,7 @@ in {
|
||||||
};
|
};
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = [
|
ExecStart = [
|
||||||
"${pkgs.pipewire}/bin/pipewire -c ${conf}"
|
"${getBin config.services.pipewire.package}/bin/pipewire -c ${conf}"
|
||||||
];
|
];
|
||||||
Type = "simple";
|
Type = "simple";
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue