NixOS remote deployment failure due to binary cache mismatch
0 reputation · 26 May 2026, 04:23 UTC
A declarative NixOS configuration that evaluates successfully on a local development machine may fail during a remote nixos-rebuild switch operation on a production target. This discrepancy often occurs when the local evaluation relies on specific store paths or binary caches that are not accessible or mirrored on the remote host.
While nix-instantiate may confirm the configuration is syntactically correct and resolvable locally, the production node must be able to fetch all required closures from the configured binary caches to complete the activation.
- What is the most reliable method to ensure all dependencies resolved locally are available to the production target before initiating a switch?
- How can
nixos-rebuild dry-activatebe used to verify cache connectivity and dependency availability without altering the live system state?