mirror of
https://github.com/nix-community/home-manager
synced 2024-06-01 04:23:34 +02:00
hypridle: add test
Adding the tests for the hypridle service module.
This commit is contained in:
parent
c096f64206
commit
2ebe41b47e
|
@ -239,6 +239,7 @@ in import nmtSrc {
|
|||
./modules/services/gpg-agent
|
||||
./modules/services/gromit-mpx
|
||||
./modules/services/home-manager-auto-upgrade
|
||||
./modules/services/hypridle
|
||||
./modules/services/imapnotify
|
||||
./modules/services/kanshi
|
||||
./modules/services/lieer
|
||||
|
|
36
tests/modules/services/hypridle/basic-configuration.nix
Normal file
36
tests/modules/services/hypridle/basic-configuration.nix
Normal file
|
@ -0,0 +1,36 @@
|
|||
{ pkgs, ... }: {
|
||||
services.hypridle = {
|
||||
enable = true;
|
||||
package = pkgs.hypridle;
|
||||
|
||||
settings = {
|
||||
general = {
|
||||
after_sleep_cmd = "hyprctl dispatch dpms on";
|
||||
ignore_dbus_inhibit = false;
|
||||
lock_cmd = "hyprlock";
|
||||
};
|
||||
|
||||
listener = [
|
||||
{
|
||||
timeout = 900;
|
||||
on-timeout = "hyprlock";
|
||||
}
|
||||
{
|
||||
timeout = 1200;
|
||||
on-timeout = "hyprctl dispatch dpms off";
|
||||
on-resume = "hyprctl dispatch dpms on";
|
||||
}
|
||||
];
|
||||
};
|
||||
};
|
||||
|
||||
test.stubs.hypridle = { };
|
||||
|
||||
nmt.script = ''
|
||||
config=home-files/.config/hypr/hypridle.conf
|
||||
clientServiceFile=home-files/.config/systemd/user/hypridle.service
|
||||
assertFileExists $config
|
||||
assertFileExists $clientServiceFile
|
||||
assertFileContent $config ${./hypridle.conf}
|
||||
'';
|
||||
}
|
1
tests/modules/services/hypridle/default.nix
Normal file
1
tests/modules/services/hypridle/default.nix
Normal file
|
@ -0,0 +1 @@
|
|||
{ hypridle-basic-configuration = ./basic-configuration.nix; }
|
16
tests/modules/services/hypridle/hypridle.conf
Normal file
16
tests/modules/services/hypridle/hypridle.conf
Normal file
|
@ -0,0 +1,16 @@
|
|||
general {
|
||||
after_sleep_cmd=hyprctl dispatch dpms on
|
||||
ignore_dbus_inhibit=false
|
||||
lock_cmd=hyprlock
|
||||
}
|
||||
|
||||
listener {
|
||||
on-timeout=hyprlock
|
||||
timeout=900
|
||||
}
|
||||
|
||||
listener {
|
||||
on-resume=hyprctl dispatch dpms on
|
||||
on-timeout=hyprctl dispatch dpms off
|
||||
timeout=1200
|
||||
}
|
Loading…
Reference in New Issue
Block a user