1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-13 10:13:39 +02:00
home-manager/tests/modules/services/hypridle/basic-configuration.nix
Austin Horstman 2ebe41b47e
hypridle: add test
Adding the tests for the hypridle service module.
2024-05-01 08:01:33 -05:00

37 lines
820 B
Nix

{ 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}
'';
}