puzzlevision/modules/nixos/common/audio/default.nix

24 lines
500 B
Nix

{
lib,
namespace,
config,
...
}:
let
inherit (lib) mkEnableOption mkIf;
cfg = config.${namespace}.common.audio;
in {
options.${namespace}.common.audio = { enable = mkEnableOption "whether to enable common audio support and tweaks"; };
config = mkIf cfg.enable {
services.pulseaudio.enable = false;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
};
}