1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-27 13:39:46 +01:00
home-manager/tests/modules/services/swayosd/swayosd.nix

41 lines
1 KiB
Nix
Raw Normal View History

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