Dotfiles : Add a timer to sync daily.
This commit is contained in:
parent
a629aab5f5
commit
8aa77958b3
|
@ -28,9 +28,23 @@
|
||||||
${pkgs.git}/bin/git pull
|
${pkgs.git}/bin/git pull
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
timer = {
|
||||||
|
timerConfig = {
|
||||||
|
OnCalendar = "daily";
|
||||||
|
Unit = "dotfiles.service";
|
||||||
|
};
|
||||||
|
wantedBy = [ "timers.target" ];
|
||||||
|
};
|
||||||
dotsSource = inputs.dotfiles;
|
dotsSource = inputs.dotfiles;
|
||||||
in {
|
in {
|
||||||
|
# Service.
|
||||||
systemd.user.services.dotfiles = unit;
|
systemd.user.services.dotfiles = unit;
|
||||||
systemd.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;
|
environment.etc.dotfiles.source = dotsSource;
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue