commit 86e325ffdb23d219188c615747f12e35ad5fdc68 parent 585d99e518fd2f6cb648113d988e642f0183cee8 Author: Vincent Demeester <vincent@sbr.pm> Date: Wed, 18 Mar 2020 17:12:47 +0100 honshu: add mr u daily 👼 Signed-off-by: Vincent Demeester <vincent@sbr.pm> Diffstat:
M | tmp/nixos-configuration/machine/honshu.nix | | | 25 | +++++++++++++++++++++++++ |
1 file changed, 25 insertions(+), 0 deletions(-)
diff --git a/tmp/nixos-configuration/machine/honshu.nix b/tmp/nixos-configuration/machine/honshu.nix @@ -81,4 +81,29 @@ with import ../assets/machines.nix; { startAt = "hourly"; }; + # mr -i u daily + systemd.services.ape = { + description = "Update configs daily"; + requires = [ "network-online.target" ]; + after = [ "network-online.target" ]; + + restartIfChanged = false; + unitConfig.X-StopOnRemoval = false; + + serviceConfig = { + Type = "oneshot"; + User = "vincent"; + OnFailure = "status-email-root@%n.service"; + }; + + path = with pkgs; [ git mr ]; + script = '' + set -e + cd /mnt/synodine/volumeUSB2/usbshare/src/github.com/vdemeester/configs/ + mr -t run git reset --hard HEAD + mr -t u + ''; + + startAt = "daily"; + }; }