1
0
mirror of https://github.com/nix-community/home-manager synced 2024-06-26 16:38:34 +02:00
home-manager/tests/modules/systemd/timers.nix
2020-04-10 01:01:20 +02:00

26 lines
547 B
Nix

{ config, lib, pkgs, ... }:
with lib;
{
config = {
systemd.user.timers.test-timer = {
Unit = { Description = "A basic test timer"; };
Timer = { OnUnitActiveSec = "1h 30m"; };
Install = { WantedBy = [ "timers.target" ]; };
};
nmt.script = ''
unitDir=home-files/.config/systemd/user
timerFile=$unitDir/test-timer.timer
assertFileExists $timerFile
assertFileContent $timerFile ${./timers-expected.conf}
assertFileExists $unitDir/timers.target.wants/test-timer.timer
'';
};
}