Onor.io
Nix Flake Template for Elixir?
I apologize in advance if I am posting this in the wrong place.
I see a nix package for Elixir (in fact I see several). Big kudos to those folks who have taken the time to do this!
I want to create a nix flake for an Elixir app I’m working on and I can create a plain old nix flake but I was wondering if someone has already created a nix flake template for Elixir? Googling hasn’t turned up anything (although I may be using the wrong search terms).
Most Liked
shanesveller
I maintain some OSS Nix<->BEAM tooling, which offers flake init templates, support for ingesting asdf .tool-versions files, reusable dev shells and a few other niceties, based on flake-parts lib. Repo is here and feedback or critiques are welcome. Example usage is also documented here.
I’ve been iterating and daily driving it for a couple years at this point, and haven’t had asdf/mise/rtx installed at all in the last 18 months or so.
c4710n
Hey, @Onor.io. Very happy to see that you like Nix.
After the post mentioned by @zimt28, my workflow improved a lot. If you continue to use Nix, I believe you will encounter some issues, like:
- How to init a project quickly?
- How to package an Elixir app as a Nix derivation?
- How to package an Elixir app as a Docker image with Nix?
I really like building Docker image with Nix Flake - I don’t have to sync
.dockerignorewith.gitignoreanymore.
All above problems already have solutions, I hope the following links are also useful to you in the future.
- using Nix template: You can create your own nix-dev-template by following the-nix-way/dev-templates or c4710n/nix-dev-templates, etc.
- Check out nix-dev-templates/elixir/phoenix/nix/release.nix at 8c8ed3b805c043e2666124fa2b4e22067ca1d0df · c4710n/nix-dev-templates · GitHub.
- Check out nix-dev-templates/elixir/phoenix/flake.nix at 8c8ed3b805c043e2666124fa2b4e22067ca1d0df · c4710n/nix-dev-templates · GitHub
zimt28
onnimonni
Hey and sorry for visiting an old topic but this came to the top when searching for “nixos elixir” with Google.
Are there any public examples of using flakes to locally develop and to deploy an elixir based application to Nixos?
I’m using my own bare metal server to run this but using docker is alright too.








