aboutsummaryrefslogtreecommitdiff
path: root/home-manager/tests/modules/services/fluidsynth/service.nix
blob: 8d53e75c0324bb24256349e87acb31d5c4a5704d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
{ config, pkgs, ... }: {
  config = {
    services.fluidsynth.enable = true;
    services.fluidsynth.soundFont = "/path/to/soundFont";
    services.fluidsynth.extraOptions = [ "--sample-rate 96000" ];

    nixpkgs.overlays = [
      (self: super: {
        fluidsynth = pkgs.writeScriptBin "dummy-fluidsynth" "" // {
          outPath = "@fluidsynth@";
        };
      })
    ];

    nmt.script = ''
      serviceFile=home-files/.config/systemd/user/fluidsynth.service

      assertFileExists $serviceFile

      assertFileContains $serviceFile \
        'ExecStart=@fluidsynth@/bin/fluidsynth -a pulseaudio -si --sample-rate 96000 /path/to/soundFont'
    '';
  };
}