For bandwidth reasons I’m trying to use an existing host with a nearly identical setup to install a new host. However even after finding a lot of existing store
content the system wants to build a lot of packages from source:
boot-host> nixos-install -v --option require-sigs false --option trusted-substituters ssh-ng://me@other-host --option substituters ssh-ng://me@other-host --flake .#new-host
copying channel...
building the flake in git+file:///root/nixos?ref=refs%2fheads%2fmain&rev=abcdef...
these 476 derivations will be built:
/nix/store/c81xzgfi1a5nlj6g2fkz9b1m79f2w6hf-binutils-2.40.drv
/nix/store/5fqb4cy0srbzw1lfmny30x66fmh6jmpg-binutils-wrapper-2.40.drv
/nix/store/q072lsl54bjjlgsj06w7fb431cz2ckci-xgcc-12.2.0.drv
...
Checking the store on the other host shows that files are there:
other-host> cd /nix/store
other-host> nix-store --query q072lsl54bjjlgsj06w7fb431cz2ckci-xgcc-12.2.0.drv
/nix/store/108m570wl346n4g5789cl6j06cy3224f-xgcc-12.2.0-info
/nix/store/62ywnzqgdjhl5v5ccb3fkrd8daqa49s8-xgcc-12.2.0-lib
/nix/store/7rkzy3l3m05wqlld8624d348aakrij17-xgcc-12.2.0-checksum
/nix/store/dxxvdwqnh3040znk31gll520si8qcvai-xgcc-12.2.0
/nix/store/jd99cyc0251p0i5y69w8mqjcai8mcq7h-xgcc-12.2.0-libgcc
/nix/store/z647vyl1d2mhqcpbd9nwvjl1f2yf2m77-xgcc-12.2.0-man
Adding multiple -v
to nixos-install
didn’t reveal the reason why the packages are rebuild.
Is there some way to make nixos-install
take the existing packages and just put them in the new system?
Thank you!