- Follow the installation guide for nix: https://devenv.sh/getting-started
- Add
devenv.nixto your project root - Add
devenv.yamlto your project root. Note: I did this because I had issues with the 'unstable' dist and for ES you need to allow unfree packages
To start the processes:
devenv up
To go into the shell, but I would suggest using direnv: https://devenv.sh/automatic-shell-activation
devenv shell
Is enabled by default, and seems to be working out of the box in PhpStorm. I did set the PHP executable manually in Settings < PHP < CLI Interpreter < PHP Executable to:
/Users/louisdelooze/dev/<your_folder>/.devenv/profile/bin/php
And then I use the Xdebug browser extension, e.g.: Xdebug Helper for Firefox
If you want to add Blackfire:
{
...
services.blackfire = {
enable = true;
client-id = "12xxx";
client-token = "9be3xxx";
server-id = "a513xxx";
server-token = "9a2xxx";
};
...
}
and change:
...
languages.php.package = pkgs.php82.buildEnv {
extensions = { all, enabled }: with all; enabled ++ [ xdebug xsl redis imagick blackfire ];
...