home-manager/tests/modules/services/fluidsynth/service.nix

26 lines
681 B
Nix
Raw Normal View History

2023-05-12 22:08:12 +00:00
{ ... }:
2023-05-12 22:08:12 +00:00
{
services.fluidsynth.enable = true;
services.fluidsynth.soundService = "pipewire-pulse";
services.fluidsynth.soundFont = "/path/to/soundFont";
services.fluidsynth.extraOptions = [ "--sample-rate 96000" ];
2023-05-12 22:08:12 +00:00
test.stubs.fluidsynth = { };
2023-05-12 22:08:12 +00:00
nmt.script = ''
serviceFile=home-files/.config/systemd/user/fluidsynth.service
2023-05-12 22:08:12 +00:00
assertFileExists $serviceFile
2023-05-12 22:08:12 +00:00
assertFileContains $serviceFile \
'ExecStart=@fluidsynth@/bin/fluidsynth -a pulseaudio -si --sample-rate 96000 /path/to/soundFont'
2023-05-12 22:08:12 +00:00
assertFileContains $serviceFile \
'After=pipewire-pulse.service'
assertFileContains $serviceFile \
'BindsTo=pipewire-pulse.service'
'';
}