See wiki page.
nix flake init -t github:eduvo/flake-templates#<template>For example,
nix flake init -t github:eduvo/flake-templates#rails-mysqlBy using a template, the files of the <template> are downloaded to current directory.
direnv allowThe packages and services (such as databases) specified in the template will be installed automatically.
Services are managed by devenv, which is installed automatically.
devenv upFor example,
> devenv up
10:43:25 system | memcached.1 started (pid=28338)
10:43:25 system | redis.1 started (pid=28339)
10:43:25 system | mysql-configure.1 started (pid=28340)
10:43:25 system | mysql.1 started (pid=28341)If you're using foreman to manage your
application processes, add devenv up to Procfile, so you can run a single
command for development.
For example, given the Procfile:
web: rails server -p 3000
js: yarn build --watch
css: yarn build:css --watch
sidekiq: bundle exec sidekiq -C config/sidekiq.yml
ngrok: ngrok http --domain=fariapay.ngrok.dev 3000
devenv: devenv up
Run the dev command starts all processes:
> dev
10:28:35 web.1 | started with pid 63731
10:28:35 js.1 | started with pid 63732
10:28:35 css.1 | started with pid 63733
10:28:35 sidekiq.1 | started with pid 63734
10:28:35 ngrok.1 | started with pid 63735
10:28:35 devenv.1 | started with pid 63736Notice no need to use bin/dev as bin is already added to the PATH environment variable.