Commit 6c4692ed9bf4

Vincent Demeester <vincent@sbr.pm>
2026-03-30 14:20:12
fix(okinawa): use --remove-destination in opencode preStart
Nix store source file is read-only, so cp cannot overwrite the existing config file on service restart.
1 parent 80f7c8e
Changed files (1)
systems
okinawa
systems/okinawa/extra.nix
@@ -343,10 +343,11 @@
         GOOGLE_VERTEX_LOCATION = "us-east5";
       };
 
-      # Copy config file before start
+      # Copy config file before start (--remove-destination needed because
+      # the nix store source is read-only, so cp can't overwrite in place)
       preStart = ''
         mkdir -p /run/opencode/config/opencode
-        cp ${opencode-config} /run/opencode/config/opencode/opencode.json
+        cp --remove-destination ${opencode-config} /run/opencode/config/opencode/opencode.json
       '';
     };