2023-08-16 00:23:36 +02:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
{
|
|
|
|
config = lib.mkIf config.hardware.librem5.audio {
|
|
|
|
assertions = [{
|
|
|
|
assertion = config.hardware.pulseaudio.enable;
|
|
|
|
message = "Call audio on Librem5 requires pulse audio to be enabled through `hardware.pulseaudio.enable`.";
|
|
|
|
}];
|
|
|
|
hardware.pulseaudio = {
|
|
|
|
enable = true;
|
|
|
|
# this is required to correctly configure the modem as PA source/sink
|
|
|
|
extraConfig = ''
|
2024-05-05 07:13:06 +02:00
|
|
|
.include ${config.hardware.librem5.package}/etc/pulse/librem5.pa
|
2023-08-16 00:23:36 +02:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
services.dbus.packages = [ pkgs.callaudiod ];
|
|
|
|
};
|
|
|
|
}
|