2024-12-22 22:26:41 -08:00
|
|
|
{ lib, config, ... }:
|
|
|
|
let
|
|
|
|
cfg = config.liminalOS.system.audio;
|
|
|
|
in
|
2024-08-03 18:51:57 -07:00
|
|
|
{
|
2024-12-22 22:26:41 -08:00
|
|
|
options.liminalOS.system.audio.enable = lib.mkOption {
|
|
|
|
type = lib.types.bool;
|
2024-12-23 04:29:01 -08:00
|
|
|
default = config.liminalOS.enable;
|
2024-12-22 22:26:41 -08:00
|
|
|
description = ''
|
|
|
|
Whether to set up PipeWire and default audio utilities.
|
|
|
|
'';
|
2024-08-03 18:51:57 -07:00
|
|
|
};
|
2024-08-28 14:19:39 -07:00
|
|
|
|
2024-12-22 22:26:41 -08:00
|
|
|
config = {
|
|
|
|
services.playerctld.enable = lib.mkIf cfg.enable true;
|
|
|
|
hardware.pulseaudio.enable = lib.mkIf cfg.enable false;
|
|
|
|
services.pipewire = lib.mkIf cfg.enable {
|
|
|
|
enable = true;
|
|
|
|
alsa.enable = true;
|
|
|
|
alsa.support32Bit = true;
|
|
|
|
pulse.enable = true;
|
|
|
|
jack.enable = true;
|
|
|
|
};
|
|
|
|
};
|
2024-08-03 18:51:57 -07:00
|
|
|
}
|