1
0
Fork 0
mirror of https://github.com/nix-community/home-manager synced 2024-11-09 12:49:44 +01:00
home-manager/tests/modules/systemd/timers.nix

22 lines
475 B
Nix
Raw Normal View History

2023-05-13 00:08:12 +02:00
{ ... }:
2019-03-24 15:52:30 +01:00
{
2023-05-13 00:08:12 +02:00
systemd.user.timers.test-timer = {
Unit = { Description = "A basic test timer"; };
2019-03-24 15:52:30 +01:00
2023-05-13 00:08:12 +02:00
Timer = { OnUnitActiveSec = "1h 30m"; };
2019-03-24 15:52:30 +01:00
2023-05-13 00:08:12 +02:00
Install = { WantedBy = [ "timers.target" ]; };
};
2019-03-24 15:52:30 +01:00
2023-05-13 00:08:12 +02:00
nmt.script = ''
unitDir=home-files/.config/systemd/user
timerFile=$unitDir/test-timer.timer
2019-03-24 15:52:30 +01:00
2023-05-13 00:08:12 +02:00
assertFileExists $timerFile
assertFileContent $timerFile ${./timers-expected.conf}
2019-03-24 15:52:30 +01:00
2023-05-13 00:08:12 +02:00
assertFileExists $unitDir/timers.target.wants/test-timer.timer
'';
2019-03-24 15:52:30 +01:00
}