config/modules/nixos/hardware/audio/default.nix

34 lines
654 B
Nix
Raw Normal View History

2024-05-23 20:26:30 +00:00
{
lib,
config,
pkgs,
...
}:
with lib;
with lib.custom; let
cfg = config.hardware.audio;
in {
options.hardware.audio = with types; {
enable = mkBoolOpt false "Enable Audio";
};
config = mkIf cfg.enable {
2025-05-06 20:02:36 -04:00
services.pulseaudio.enable = false;
2024-05-23 20:26:30 +00:00
security.rtkit.enable = true;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
2025-03-22 16:03:07 -04:00
wireplumber.enable = true;
2024-05-23 20:26:30 +00:00
jack.enable = true;
};
2025-04-07 15:36:47 -04:00
2026-01-13 15:39:16 -05:00
services.pipewire.extraConfig.pipewire."92-low-latency" = {
"context.properties" = {
"default.clock.rate" = 192000;
2025-04-07 15:36:47 -04:00
};
};
2024-05-23 20:26:30 +00:00
};
}