mirror of
https://github.com/nix-community/raspberry-pi-nix.git
synced 2025-11-08 19:46:03 +01:00
17 lines
554 B
Nix
17 lines
554 B
Nix
{ config, lib, pkgs, ... }:
|
|
|
|
let cfg = config.hardware.raspberry-pi.audio;
|
|
in {
|
|
options.hardware.raspberry-pi.audio = {
|
|
enable = lib.mkEnableOption "configuration for audio";
|
|
};
|
|
config = lib.mkIf cfg.enable {
|
|
hardware = {
|
|
raspberry-pi.deviceTree.base-dtb-params = [ "audio=on" ];
|
|
pulseaudio.configFile = lib.mkOverride 990
|
|
(pkgs.runCommand "default.pa" { } ''
|
|
sed 's/module-udev-detect$/module-udev-detect tsched=0/' ${config.hardware.pulseaudio.package}/etc/pulse/default.pa > $out
|
|
'');
|
|
};
|
|
};
|
|
}
|