oxalica / rust-overlay

Pure and reproducible nix overlay of binary distributed rust toolchains
MIT License
933 stars 53 forks source link

Flake template for rust-overlay #119

Open 2gn opened 1 year ago

2gn commented 1 year ago

There are great examples in examples/ folder, but I'd like to initialize flake from this project directly using nix flake's --template flag. like so: nix flake init --template github:oxalica/rust-overlay Could you add templates option to this project's flake.nix?

oxalica commented 1 month ago

More context: https://github.com/oxalica/rust-overlay/pull/188#issuecomment-2352156306 There seem to be quite some users :+1: on this issue. I want to know in which scenario do you want flake templates, any idea?

holly-hacker commented 1 month ago

Currently I keep a rust-flake.nix file around that I copy/paste in every project. I can add more for different project types (eg. one for embedded dev) but I feel like it'd be better if they were all in the same repo, so everybody can make use of them and we can be more certain that best practices are followed. That way, I can just come here, pick a template, and initialize it with a single command.

I'm not saying I expect this repo to house templates for every imaginable project type, but some starting points would be good.