Dotfiles : Add a timer to sync daily.

This commit is contained in:
Dmitry Voronin 2024-02-22 14:43:24 +03:00
parent a629aab5f5
commit 8aa77958b3

View file

@ -28,9 +28,23 @@
${pkgs.git}/bin/git pull
'';
};
timer = {
timerConfig = {
OnCalendar = "daily";
Unit = "dotfiles.service";
};
wantedBy = [ "timers.target" ];
};
dotsSource = inputs.dotfiles;
in {
# Service.
systemd.user.services.dotfiles = unit;
systemd.services.dotfiles = unit;
# Sync timer.
systemd.timers.dotfiles = timer;
systemd.user.timers.dotfiles = timer;
# Link copy to /etc/dotfiles
environment.etc.dotfiles.source = dotsSource;
}