Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

re-running nix-installer with additional arguments errors #935

Open
knl opened this issue Apr 17, 2024 · 2 comments
Open

re-running nix-installer with additional arguments errors #935

knl opened this issue Apr 17, 2024 · 2 comments

Comments

@knl
Copy link

knl commented Apr 17, 2024

I re-run the installer, adding this to the second invocation: --extra-conf 'trusted-users = knl', and got an error. If the differences are in the arguments, I would expect just a creation of a new nix.conf.

Error

Error: 
   0: Unable to parse existing receipt `/nix/receipt.json`, it may be from an incompatible version of `nix-installer`. Try running `/nix/nix-installer uninstall`, then installing again.
   1: missing field `enterprise_edition` at line 52 column 11

Metadata

key value
version 0.18.0
os macos
arch aarch64
@cole-h
Copy link
Member

cole-h commented Apr 18, 2024

It sounds like you had previously installed using an older version of our installer (like, say, v0.17.1), which is why that specific error is occurring (you can check by comparing the output of /nix/nix-installer --version or looking at /etc/receipt.json, which has the version you installed with as the very first object). However, even if you were using the same version that you installed with (e.g. by running /nix/nix-installer), you would still get this error:

Found existing plan in `/nix/receipt.json` which used different planner settings, try uninstalling the existing install with `/nix/nix-installer uninstall`

If you want to modify the contents of your nix.conf after you have already installed Nix, please do so manually by editing /etc/nix/nix.conf.

If you really, really want to just rerun the installer with these additional settings, you could try removing the receipt file with rm /nix/receipt.json and rerunning the installer after that -- but if something breaks, you'll be stuck with both halves.

@grahamc
Copy link
Member

grahamc commented Apr 18, 2024

One note is that as a Nix installer, this project isn't currently equipped to manage changes over time. If this is for work, we're working with customers now on automating the management of Nix configurations and versions over time. If you're interested in that we'd be glad to chat. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants