home-manager/tests/modules/services/avizo/with-settings.nix
Robert Helgesson 7a3f0b3b8d
tests: rework derivation stubbing
Instead of having to manually stub packages that should not be
downloaded we instead automatically stub all packages (except a small
list of whitelisted ones). Tests can re-introduce the real package by
using the `realPkgs` module argument.
2025-02-04 23:58:20 +01:00

50 lines
1.1 KiB
Nix

{
services.avizo = {
enable = true;
settings = {
default = {
time = 1.0;
y-offset = 0.5;
fade-in = 0.1;
fade-out = 0.2;
padding = 10;
};
};
};
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
assertFileExists $configFile
assertFileContent $configFile ${
builtins.toFile "expected" ''
[default]
fade-in=0.100000
fade-out=0.200000
padding=10
time=1.000000
y-offset=0.500000
''
}
'';
}