summary refs log tree commit diff stats
path: root/system/services/nix-sync/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'system/services/nix-sync/default.nix')
-rw-r--r--system/services/nix-sync/default.nix7
1 files changed, 4 insertions, 3 deletions
diff --git a/system/services/nix-sync/default.nix b/system/services/nix-sync/default.nix
index 44348c0..8c466b8 100644
--- a/system/services/nix-sync/default.nix
+++ b/system/services/nix-sync/default.nix
@@ -10,7 +10,7 @@
     description = "Nix sync ${name} timer";
     wantedBy = ["timers.target"];
     timerConfig = {
-      OnActiveSec = repo.interval;
+      OnUnitActiveSec = repo.interval;
     };
     after = ["network-online.target"];
   };
@@ -37,7 +37,7 @@
       branch="$(git rev-parse @)";
 
       if ! [ "$origin" = "$branch" ]; then
-        git pull;
+        git pull --rebase;
 
         out_paths=$(mktemp);
         nix build . --print-out-paths --experimental-features 'nix-command flakes' > "$out_paths";
@@ -66,7 +66,7 @@
       if ! [ -L ${esa repo.path} ]; then
         cd ${esa repoCachePath};
 
-        git pull;
+        git pull --rebase;
 
         out_paths=$(mktemp);
         nix build . --print-out-paths --experimental-features 'nix-command flakes' > "$out_paths";
@@ -88,6 +88,7 @@
     preStart = execStartPreScript;
 
     serviceConfig = {
+      TimeoutSec = 0;
       ExecStart = execStartScript;
       Restart = "on-abort";
       # User and group