mirror of
https://github.com/NixOS/nixos-hardware
synced 2024-12-25 02:59:45 +01:00
19 lines
559 B
Nix
19 lines
559 B
Nix
|
{ 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 = ''
|
||
|
.include ${pkgs.librem5-base}/etc/pulse/librem5.pa
|
||
|
'';
|
||
|
};
|
||
|
|
||
|
services.dbus.packages = [ pkgs.callaudiod ];
|
||
|
};
|
||
|
}
|