Support nix flakes

Describe your feature request

I see that there is a blog post mentioning Nix flakes several times, however I don’t see any open posts here about supporting them.
See also: Nix flakes

What problem(s) would this feature solve?

Using nix flakes in a development environment. This might allow existing projects that use a flake.nix to be supported out of the box instead of requiring a special replit.nix file. Even other nix projects use shell.nix.

Explain what you were trying to do when you came across the problem leading to this feature request

I could be wrong but from what I’ve seen it only seems to support replit.nix and not flake.nix…

2 Likes

I want to second this request. However, I can provide some specifics. You have “Shell” right now, which does, in fact, use Nix to generate an environment with support for flakes; you could use the dev shell specified in the flake. A flake can provide multiple shells, and it would be nice to choose a shell in cases where that is possible. Run and build controls in reply. It could be wired to flake applications and packages. Flake.lock files could be used to sync repl.it environments to local environments, making local dev and developing on repl.it low friction. You could provide UI to interact with flakes, for example updating deps. You can provide UI integrated with flake checks, providing CI-like feedback during development. Formatting no save can take advantage of nix fmt. It goes on. Take a look at the nix flake schema, its very well aligned with repl.it’s UI.