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

24 lines
527 B
Nix
Raw Normal View History

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