home-manager/tests/modules/services/swayosd/swayosd.nix

37 lines
860 B
Nix
Raw Normal View History

2023-07-07 08:15:43 +00:00
{ config, ... }:
{
services.swayosd = {
enable = true;
package = config.lib.test.mkStubPackage {
name = "swayosd";
outPath = "@swayosd@";
};
2024-02-05 22:31:53 +00:00
display = "DISPLAY";
topMargin = 0.1;
2023-07-07 08:15:43 +00:00
};
nmt.script = ''
assertFileContent \
home-files/.config/systemd/user/swayosd.service \
${
builtins.toFile "swayosd.service" ''
[Install]
WantedBy=graphical-session.target
[Service]
2024-02-05 22:31:53 +00:00
ExecStart=@swayosd@/bin/swayosd-server --display DISPLAY --top-margin 0.100000
2023-07-07 08:15:43 +00:00
Restart=always
Type=simple
[Unit]
After=graphical-session.target
ConditionEnvironment=WAYLAND_DISPLAY
Description=Volume/backlight OSD indicator
Documentation=man:swayosd(1)
PartOf=graphical-session.target
''
}
'';
}