grimm-nixos-laptop/common/sound/default.nix
2024-08-15 14:59:23 +02:00

39 lines
682 B
Nix

{
pkgs,
config,
lib,
...
}:
let
inherit (config.grimmShared) enable sound;
in
{
config = lib.mkIf (enable && sound.enable) {
hardware.pulseaudio.enable = false;
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true; # osu uses jack
lowLatency.enable = true;
};
environment.systemPackages = with pkgs; [
pwvucontrol
playerctl
openal
pulseaudio
];
};
imports = [
./spotify.nix
./midi.nix
./pipewireLowLatency.nix
];
options.grimmShared.sound.enable = lib.mkEnableOption "whether to enable sound";
}