2023-08-08 10:19:01 +00:00
|
|
|
{ ... }:
|
2020-10-12 00:22:58 +00:00
|
|
|
|
|
|
|
{
|
2023-08-08 10:19:01 +00:00
|
|
|
systemd.user.timers.test-timer = {
|
|
|
|
Unit = { Description = "A basic test timer"; };
|
2020-10-12 00:22:58 +00:00
|
|
|
|
2023-08-08 10:19:01 +00:00
|
|
|
Timer = { OnUnitActiveSec = "1h 30m"; };
|
2020-10-12 00:22:58 +00:00
|
|
|
|
2023-08-08 10:19:01 +00:00
|
|
|
Install = { WantedBy = [ "timers.target" ]; };
|
|
|
|
};
|
2020-10-12 00:22:58 +00:00
|
|
|
|
2023-08-08 10:19:01 +00:00
|
|
|
nmt.script = ''
|
|
|
|
unitDir=home-files/.config/systemd/user
|
|
|
|
timerFile=$unitDir/test-timer.timer
|
2020-10-12 00:22:58 +00:00
|
|
|
|
2023-08-08 10:19:01 +00:00
|
|
|
assertFileExists $timerFile
|
|
|
|
assertFileContent $timerFile ${./timers-expected.conf}
|
2020-10-12 00:22:58 +00:00
|
|
|
|
2023-08-08 10:19:01 +00:00
|
|
|
assertFileExists $unitDir/timers.target.wants/test-timer.timer
|
|
|
|
'';
|
2020-10-12 00:22:58 +00:00
|
|
|
}
|