grimm-nixos-laptop/common/sound/default.nix
2024-04-21 16:02:55 +02:00

37 lines
724 B
Nix

{ grimm-shared-inputs, pkgs, config, lib, ... }:
let
cfg = config.grimmShared;
in
{
config = with cfg; lib.mkIf (enable && sound) {
sound.enable = true;
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
];
options.grimmShared.sound = with lib; mkOption {
type = types.bool;
default = false;
description = "whether to enable sound";
};
}