24 lines
527 B
Nix
24 lines
527 B
Nix
{ 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";
|
|
}
|