2024-04-10 16:51:28 +02:00
|
|
|
{ grimm-shared-inputs, pkgs, config, lib, ... }:
|
|
|
|
let
|
2024-03-24 16:59:47 +01:00
|
|
|
cfg = config.grimmShared;
|
2024-04-10 16:51:28 +02:00
|
|
|
in
|
|
|
|
{
|
2024-03-24 16:59:47 +01:00
|
|
|
config = with cfg; lib.mkIf (enable && sound) {
|
|
|
|
sound.enable = true;
|
|
|
|
hardware.pulseaudio.enable = false;
|
|
|
|
security.rtkit.enable = true;
|
|
|
|
services.pipewire = {
|
|
|
|
enable = true;
|
|
|
|
alsa.enable = true;
|
|
|
|
alsa.support32Bit = true;
|
|
|
|
pulse.enable = true;
|
|
|
|
jack.enable = true; # osu uses jack
|
|
|
|
lowLatency.enable = true;
|
|
|
|
systemWide = true; # required for spotifyd as spotifyd runs as the spotifyd user
|
|
|
|
};
|
|
|
|
|
|
|
|
environment.systemPackages = with pkgs; [
|
2024-04-07 10:33:55 +02:00
|
|
|
pwvucontrol
|
2024-03-24 16:59:47 +01:00
|
|
|
playerctl
|
2024-04-13 19:16:33 +02:00
|
|
|
openal
|
|
|
|
flite
|
2024-03-24 16:59:47 +01:00
|
|
|
pulseaudio
|
|
|
|
];
|
|
|
|
};
|
2024-04-16 12:09:17 +02:00
|
|
|
|
|
|
|
options.grimmShared.sound = with lib; mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
|
|
|
description = "whether to enable sound";
|
|
|
|
};
|
2024-03-24 16:59:47 +01:00
|
|
|
}
|