long story short: i have a surface tablet with an sd card in it. id like the sd card to hold /nix. i cant seem to rsync without (im guessing the links are expanding) the bigger drive (sdcard) filling up. thank you
rsync has -H flag for preserving hardlinks
Probably rsync -aH would do just fine, but Nix has a tool for this.
https://nix.dev/manual/nix/2.18/command-ref/new-cli/nix3-copy
Their closest direct example is using SSH:
Copy the entire current NixOS system closure to another machine via SSH:
# nix copy --substitute-on-destination --to ssh://server /run/current-systemThe -s flag causes the remote machine to try to substitute missing store paths, which may be faster if the link between the local and remote machines is slower than the link between the remote machine and its substituters (e.g. https://cache.nixos.org/).