2024-05-07 23:31:41 +02:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2024-04-26 21:36:24 +02:00
|
|
|
let
|
|
|
|
sound_font = pkgs.soundfont-fluid;
|
2024-05-11 22:55:59 +02:00
|
|
|
inherit (config.grimmShared) enable sound;
|
2024-04-26 21:36:24 +02:00
|
|
|
in
|
|
|
|
{
|
2024-05-11 22:55:59 +02:00
|
|
|
config = lib.mkIf (enable && sound.midi) {
|
|
|
|
environment.systemPackages =
|
|
|
|
(with pkgs; [
|
2024-05-07 23:31:41 +02:00
|
|
|
mpv
|
|
|
|
timidity
|
|
|
|
ffmpeg-full
|
2024-05-11 22:55:59 +02:00
|
|
|
])
|
|
|
|
++ [ sound_font ];
|
2024-04-26 21:36:24 +02:00
|
|
|
|
2024-05-11 22:55:59 +02:00
|
|
|
environment.pathsToLink = [ "/share/soundfonts" ];
|
2024-04-26 21:36:24 +02:00
|
|
|
|
2024-05-11 22:55:59 +02:00
|
|
|
environment.etc."timidity/timidity.cfg".text = "soundfont ${sound_font}/share/soundfonts/FluidR3_GM2-2.sf2";
|
|
|
|
};
|
2024-04-26 21:36:24 +02:00
|
|
|
|
|
|
|
options.grimmShared.sound.midi = lib.mkEnableOption "enable midi";
|
|
|
|
}
|