Ask coding questions

← Back to all posts
Run some code after nix environment is ready
EmilySeville7cfg

Hello! I have the following replit.nix file:

I want to add simple test code that runs echo 'Nix is ready!' command after everything is set up with Nix. How to do that?

In real task I want run npm install after all project tools for development are installed.

Voters
EmilySeville7cfg
Comments
hotnewtop
Saml2020

Try clicking the three dots in the file exploer, then click Show config files. A .replit file should show. Enter it and edit the run= command there. https://docs.replit.com/programming-ide/configuring-run-button

EmilySeville7cfg

@Saml2020 thanks, but I thought that there is any way to do the same in replit.nix file to hide installation steps from user. :)

Saml2020

@EmilySeville7cfg You cannot hide the nix installation message unfortunately. The only way to configue what to be run is with the replit file. The nix config files only installs nix packages.