nixos/modules/audio.nix

24 lines
427 B
Nix
Raw Normal View History

2024-06-30 08:07:09 +00:00
{ lib, config, ... }:
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;
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
};
};
}