1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-12-27 20:29:47 +01:00
home-manager/tests/modules/services/avizo/without-settings.nix
Jon Seager cc05d26326
avizo: don't write a config file if settings are empty
Before this change, the default config provided by this module wrote
an empty file to `$HOME/.config/avizo/config.ini`, which caused a
bunch of errors, as Avizo tries to read a 'group' from the ini file,
which fails.

This commit also adds associated test cases.

PR #3871
2023-04-19 21:17:56 +02:00

33 lines
763 B
Nix

{ ... }:
{
services.avizo.enable = true;
test.stubs.avizo = { };
nmt.script = ''
serviceFile=home-files/.config/systemd/user/avizo.service
assertFileExists $serviceFile
assertFileContent $serviceFile ${
builtins.toFile "expected" ''
[Install]
WantedBy=graphical-session.target
[Service]
ExecStart=@avizo@/bin/avizo-service
Restart=always
Type=simple
[Unit]
After=graphical-session.target
ConditionEnvironment=WAYLAND_DISPLAY
Description=Volume/backlight OSD indicator
Documentation=man:avizo(1)
PartOf=graphical-session.target
''
}
configFile=home-files/.config/avizo/config.ini
assertPathNotExists $configFile
'';
}