diff --git a/.config/linux/system/module/common/Dotfiles.nix b/.config/linux/system/module/common/Dotfiles.nix index dcd569d..7770f7b 100644 --- a/.config/linux/system/module/common/Dotfiles.nix +++ b/.config/linux/system/module/common/Dotfiles.nix @@ -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; }