grimm-nixos-laptop/common/sound/midi.nix

29 lines
551 B
Nix
Raw Permalink Normal View History

2024-05-07 23:31:41 +02:00
{
config,
lib,
pkgs,
...
}:
2024-04-26 21:36:24 +02:00
let
cfg = config.grimmShared;
sound_font = pkgs.soundfont-fluid;
in
{
2024-05-07 23:31:41 +02:00
config =
with cfg;
lib.mkIf (enable && sound.midi) {
environment.systemPackages = with pkgs; [
mpv
timidity
ffmpeg-full
sound_font
];
2024-04-26 21:36:24 +02:00
2024-05-07 23:31:41 +02:00
environment.pathsToLink = [ "/share/soundfonts" ];
2024-04-26 21:36:24 +02:00
2024-05-07 23:31:41 +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";
}