No 'processes' option defined
Closed this issue · 9 comments
context: I'm trying to start the blog project for the first time on a M2 mac
~/work/blog via λ on ☁️ (us-west-2)
❯ devenv init
Creating devenv.nix
Creating devenv.yaml
Done.
direnv is installed. Running direnv allow.
~/work/blog via λ on ☁️ (us-west-2)
❯ direnv allow
~/work/blog via λ on ☁️ (us-west-2)
❯ devenv up
Building shell ...
warning: creating lock file '/Users/geoff.langerderfer/work/blog/devenv.lock'
hello from devenv
git version 2.42.0
No 'processes' option defined: https://devenv.sh/processes/
~/work/blog via λ on ☁️ (us-west-2) took 4s
❯ ./start
Building shell ...
hello from devenv
git version 2.42.0
No 'processes' option defined: https://devenv.sh/processes/
~/work/blog via λ on ☁️ (us-west-2) took 4s
❯
The devenv init
likely overwrote the default devenv configuration of the IHP project. Can you try without devenv init
?
no luck
~/work on ☁️ (us-west-2)
❯ rm -rf blog
~/work on ☁️ (us-west-2)
❯ ihp-new blog
We will now create your new IHP project. This may take up to 30 seconds.
Updating build/Generated/Enums.hs
Updating build/Generated/ActualTypes.hs
Updating build/Generated/Types.hs
* Main.hs (import)
* Main.hs (import)
* Main.hs (AddMountToFrontController)
+ Web/Types.hs
+ Web/Routes.hs
+ Web/FrontController.hs
+ Web/Controller/Prelude.hs
+ Web/View/Layout.hs
+ Web/View/Prelude.hs
+ Web/Controller/Static.hs
+ Web/View/Static/Welcome.hs
direnv: loading ~/work/blog/.envrc
direnv: loading https://raw.githubusercontent.com/nix-community/nix-direnv/2.3.0/direnvrc (sha256-Dmd+j63L84wuzgyjITIfSxSD57Tx7v51DMxVZOsiUD8=)
direnv: using flake . --impure --accept-flake-config
direnv: nix-direnv: renewed cache
🚀 Project created, happy coding :)
You can start the server by running:
cd blog
devenv up
~/work on ☁️ (us-west-2) took 11s
❯ cd blog
~/work/blog via λ on ☁️ (us-west-2)
❯ devenv up
File devenv.nix does not exist. To get started, run:
$ devenv init
~/work/blog via λ on ☁️ (us-west-2)
❯ ihp-new --version
ihp-new version: 1.3.0
~/work/blog via λ on ☁️ (us-west-2)
❯
Can you try the following?
cd blog
nix develop --impure
devenv up
If that works: direnv might not be correctly working in your setup
thanks for your help! No luck yet
~/work/blog via λ on ☁️ (us-west-2)
❯ nix develop --impure
devenv up
error: experimental Nix feature 'nix-command' is disabled; use '--extra-experimental-features nix-command' to override
File devenv.nix does not exist. To get started, run:
$ devenv init
~/work/blog via λ on ☁️ (us-west-2)
❯ nix --extra-experimental-features develop --impure
devenv up
warning: unknown experimental feature 'develop'
error: unrecognised flag '--impure'
Try 'nix --help' for more information.
File devenv.nix does not exist. To get started, run:
$ devenv init
~/work/blog via λ on ☁️ (us-west-2)
❮ nix develop --extra-experimental-features --impure
devenv up
warning: unknown experimental feature '--impure'
error: experimental Nix feature 'nix-command' is disabled; use '--extra-experimental-features nix-command' to override
File devenv.nix does not exist. To get started, run:
$ devenv init
~/work/blog via λ on ☁️ (us-west-2)
❯
~/work/blog via λ on ☁️ (us-west-2)
❯ which direnv
/Users/geoff.langerderfer/.nix-profile/bin/direnv
~/work/blog via λ on ☁️ (us-west-2)
❯ direnv --version
2.32.3
Try this:
nix --extra-experimental-features nix-command develop --impure
(Sorry for nix being terrible here, I have reported that error message to the nix people in the past here NixOS/nix#7000 )
almost there!
~/work/blog via λ on ☁️ (us-west-2)
❯ nix --extra-experimental-features nix-command develop --impure
error: experimental Nix feature 'flakes' is disabled; use '--extra-experimental-features flakes' to override
~/work/blog via λ on ☁️ (us-west-2)
❯ nix --extra-experimental-features flakes develop --impure
error: experimental Nix feature 'nix-command' is disabled; use '--extra-experimental-features nix-command' to override
~/work/blog via λ on ☁️ (us-west-2)
❯ nix --extra-experimental-features flakes --extra-experimental-features nix-command develop --impure
(devenv) EB-KD96KV36L0:blog geoff.langerderfer$ devenv up
error: experimental Nix feature 'nix-command' is disabled; use '--extra-experimental-features nix-command' to override
I added this line to nix.conf
and got it working!
# ~/.config/nix/nix.conf
substituters = https://cache.nixos.org https://devenv.cachix.org https://digitallyinduced.cachix.org
trusted-public-keys = cache.nixos.org-:XXX
+ experimental-features = flakes nix-command
(devenv) $ devenv up
04:25:07 system | devServer.1 started (pid=73133)
04:25:09 devServer.1 |
one idea: append this line to the user's nix.conf
if it's not already present:
if ! grep -q "experimental-features" ~/.config/nix/nix.conf
then
echo "experimental-features = flakes nix-command" >> ~/.config/nix/nix.conf
fi
I'm not sure if you would add this to .envrc
or somewhere else.
IHP should be able to run without these flags present. The nix-direnv
plugin we use for direnv
explicitly passes --extra-experimental-features nix-command flakes
to nix. So something is still not working as expected here.