2024-05-07 23:31:41 +02:00
|
|
|
{
|
|
|
|
pkgs,
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
...
|
|
|
|
}:
|
2024-04-10 16:51:28 +02:00
|
|
|
let
|
2024-03-24 16:59:47 +01:00
|
|
|
cfg = config.grimmShared;
|
2024-04-10 16:51:28 +02:00
|
|
|
in
|
|
|
|
{
|
2024-05-07 23:31:41 +02:00
|
|
|
config =
|
|
|
|
with cfg;
|
|
|
|
lib.mkIf (enable && sound.enable) {
|
|
|
|
sound.enable = true;
|
|
|
|
hardware.pulseaudio.enable = false;
|
2024-04-21 16:02:55 +02:00
|
|
|
|
2024-05-07 23:31:41 +02:00
|
|
|
services.pipewire = {
|
|
|
|
enable = true;
|
|
|
|
alsa.enable = true;
|
|
|
|
alsa.support32Bit = true;
|
|
|
|
pulse.enable = true;
|
|
|
|
jack.enable = true; # osu uses jack
|
|
|
|
lowLatency.enable = true;
|
|
|
|
};
|
2024-03-24 16:59:47 +01:00
|
|
|
|
2024-05-07 23:31:41 +02:00
|
|
|
environment.systemPackages = with pkgs; [
|
|
|
|
pwvucontrol
|
|
|
|
playerctl
|
|
|
|
openal
|
|
|
|
pulseaudio
|
|
|
|
];
|
|
|
|
};
|
2024-04-16 12:09:17 +02:00
|
|
|
|
2024-04-21 10:59:29 +02:00
|
|
|
imports = [
|
|
|
|
./spotify.nix
|
2024-04-26 21:36:24 +02:00
|
|
|
./midi.nix
|
2024-05-06 23:22:32 +02:00
|
|
|
./pipewireLowLatency.nix
|
2024-04-21 10:59:29 +02:00
|
|
|
];
|
|
|
|
|
2024-04-26 21:36:24 +02:00
|
|
|
options.grimmShared.sound.enable = lib.mkEnableOption "whether to enable sound";
|
2024-03-24 16:59:47 +01:00
|
|
|
}
|