nixos/modules/audio.nix

25 lines
504 B
Nix
Raw Permalink Normal View History

2024-09-03 07:29:38 +00:00
{ lib, config, pkgs, ... }:
2024-06-30 08:07:09 +00:00
let
cfg = config.snowhawk.audio;
in
{
options.snowhawk.audio = {
enable = lib.mkEnableOption "audio";
};
config = lib.mkIf cfg.enable {
# Enable sound with pipewire.
hardware.pulseaudio.enable = false;
2024-09-03 07:29:38 +00:00
hardware.pulseaudio.extraModules = [ pkgs.pulseaudio-modules-bt ];
2024-06-30 08:07:09 +00:00
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
};
}