swayosd: add module
This commit is contained in:
parent
069d450b6d
commit
98282a481d
6 changed files with 104 additions and 0 deletions
1
tests/modules/services/swayosd/default.nix
Normal file
1
tests/modules/services/swayosd/default.nix
Normal file
|
|
@ -0,0 +1 @@
|
|||
{ swayosd = ./swayosd.nix; }
|
||||
35
tests/modules/services/swayosd/swayosd.nix
Normal file
35
tests/modules/services/swayosd/swayosd.nix
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{ config, ... }:
|
||||
|
||||
{
|
||||
services.swayosd = {
|
||||
enable = true;
|
||||
package = config.lib.test.mkStubPackage {
|
||||
name = "swayosd";
|
||||
outPath = "@swayosd@";
|
||||
};
|
||||
maxVolume = 10;
|
||||
};
|
||||
|
||||
nmt.script = ''
|
||||
assertFileContent \
|
||||
home-files/.config/systemd/user/swayosd.service \
|
||||
${
|
||||
builtins.toFile "swayosd.service" ''
|
||||
[Install]
|
||||
WantedBy=graphical-session.target
|
||||
|
||||
[Service]
|
||||
ExecStart=@swayosd@/bin/swayosd --max-volume 10
|
||||
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
|
||||
''
|
||||
}
|
||||
'';
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue