Home manager using a different nix store?

So I had a mac, turned 100gb into a nixos box which works well but need more diskspace. I don’t really want to destroy that box in order to make the partion bigger (apparently you can expand them towards the end of the disk but not the other way). So I figured I could mount another 100gb drive, have home manager sit on that and anything it did not have it could point back to the root’s nix store.

Is something like this possibly/easy/sane? Or should I blow everything away and start again? ( maybe I could copy the disk to an earlier point but I don’t yet want to overwrite my mac bit by mistake)

For reference, having booted up on the live install usb and plugged a keyboard in,

I used parted to create a bigger partition earlier in the disk.
I used e2image to copy from later partion to earlier one. (That was painless and fast - 700mb/s)
Checked the earlier partion booted the same using grub.
Deleted the latter partition
Switched parted to sector units
Deleted the earlier partition
Created a partition starting at the same place but much bigger
Ran e2fsck on the new partion (Because resize2fs told me to)
Ran resize2fs on the nice big partition so the filesytem could see the extra space.

I know nothing about how to do any of the above but it all just worked. Really quite impressed with this linux stuff and wasn’t painful. Wow.

1 Like