MatthewCroughan / nixinate

Another NixOS Deployment Tool - Nixinate your systems 🕶️
MIT License
240 stars 32 forks source link

don't know how to build these path #37

Closed happysalada closed 1 year ago

happysalada commented 1 year ago

hey I've just updated to the latest nixinate master and it seems to be giving me the following error

don't know how to build these paths:
  /nix/store/cw9hr92idq1p5iady76xm4si9jqha2yw-nixos-rebuild
error: build of '/nix/store/cw9hr92idq1p5iady76xm4si9jqha2yw-nixos-rebuild' failed

Do I need to change anything ?

MatthewCroughan commented 1 year ago

@happysalada Can you do the following:

  1. give me the output of nix-info -m
  2. show me how you're using nixinate in your nixosConfiguration
MatthewCroughan commented 1 year ago

I should start versioning Nixinate, and it is something I intend to do, there's also a few things the VM Tests fail to catch as noted in #32, I'm working on a big update that uses recursive-nix and impure-derivations to perform deployments in the Nix sandbox, so watch this space.

MatthewCroughan commented 1 year ago

My suspicion is that I expect this issue to have something to do with the host-architecture you're deploying from, as the only change I've made recently is to make hermetic builds the default, which means a quick fix would be to set hermetic to false explicitly in your Nixinate arguments, if this is the case.

happysalada commented 1 year ago

that was indeed what broke it. I have no idea what hermetic is, but you can't do it on a remote build apparently. Thanks for the quick response!

MatthewCroughan commented 1 year ago

@happysalada Hermetic is documented in the README. What it will do is copy nix and nixos-rebuild to the remote machine, rather than impurely executing the nixos-rebuild on the remote machine, assuming it is there.

happysalada commented 1 year ago

oh that makes sense, I'm on a darwin machine and trying to build on a linux machine. That's why it doesn't work. Ok, thanks for the explanation!

MatthewCroughan commented 1 year ago

Yeah, it's why I didn't make hermetic default for the longest time, but I figure the most common use case is probably going to be aided by hermetic. I reckon there's a way of making the remote realise its own Nix instead of even having to evaluate the drv on the local machine, making it truly hermetic, without having this flaw of being unable to realise the drv for a foreign architecture.