nix-conf/modules/hardware/audio/default.nix
2023-04-24 17:55:12 +02:00

29 lines
576 B
Nix

{ options, config, pkgs, lib, ... }:
with lib;
#with lib.internal;
let cfg = config.custom.hardware.audio;
in
{
options.custom.hardware.audio = with types; {
enable = mkBoolOpt false "Whether or not to enable audio support.";
};
config = mkIf cfg.enable {
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa = {
enable = true;
support32Bit = true;
};
pulse.enable = true;
jack.enable = true;
wireplumber.enable = true;
};
hardware.pulseaudio.enable = mkForce false;
};
}