mirror of
https://github.com/nix-community/home-manager
synced 2024-11-16 08:09:45 +01:00
cb09a968e9
This option provides a more convenient way to overlay dummy packages. It also adds a function `config.lib.test.mkStubPackage` that can, e.g., be used for `package` options.
25 lines
742 B
Nix
25 lines
742 B
Nix
{ config, pkgs, ... }: {
|
|
config = {
|
|
services.fluidsynth.enable = true;
|
|
services.fluidsynth.soundService = "pipewire-pulse";
|
|
services.fluidsynth.soundFont = "/path/to/soundFont";
|
|
services.fluidsynth.extraOptions = [ "--sample-rate 96000" ];
|
|
|
|
test.stubs.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'
|
|
|
|
assertFileContains $serviceFile \
|
|
'After=pipewire-pulse.service'
|
|
|
|
assertFileContains $serviceFile \
|
|
'BindsTo=pipewire-pulse.service'
|
|
'';
|
|
};
|
|
}
|