Commit 86e325ffdb23

Vincent Demeester <vincent@sbr.pm>
2020-03-18 17:12:47
honshu: add mr u daily 👼
Signed-off-by: Vincent Demeester <vincent@sbr.pm>
1 parent 585d99e
Changed files (1)
tmp
nixos-configuration
machine
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";
+  };
 }