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

Better handling if nix-command is not enabled #1110

Open
ninjalf2 opened this issue Jan 31, 2025 · 0 comments
Open

Better handling if nix-command is not enabled #1110

ninjalf2 opened this issue Jan 31, 2025 · 0 comments

Comments

@ninjalf2
Copy link

ninjalf2 commented Jan 31, 2025

After installing obelisk on a clean install of Ubuntu 24.10, I get this error when running ob run:

user@vm:~/emptydir$ ob run
./.obelisk/impl: command not cached, building ...
DONE Built on ./.obelisk/impl [command]
Process exited with code 1; /nix/store/7wfnj6hg24p9v212qfx81a16f6rnaqzy-nix-2.11.0/bin/nix eval --impure --expr $'(let a = import ./. {}; in toString (a.reflex.nixpkgs.lib.isDerivation a.passthru.staticFilesImpure))' --raw

Then, running the command myself I find out that it's because nix-command is not enabled:

user@vm:~/emptydir$ /nix/store/7wfnj6hg24p9v212qfx81a16f6rnaqzy-nix-2.11.0/bin/nix eval --impure --expr $'(let a = import ./. {}; in toString (a.reflex.nixpkgs.lib.isDerivation a.passthru.staticFilesImpure))' --raw
error: experimental Nix feature 'nix-command' is disabled; use '--extra-experimental-features

After setting experimental-features = nix-command in my /etc/nix/nix.conf and restarting the Nix daemon then it works and my local dev server is up and running. Great!

But the error message that I got initially was not very helpful and even though it did not take much work to find the cause, it should be detected somewhere automatically and the user should be handed an error message that actually explains what is wrong.

EDIT: Related to #1085, #1061, #1010, #1072, and possibly more. Sorry for not checking beforehand. Feel free to close it if necessary.

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

1 participant