feat: support generating flake.nix via --flake#834
Conversation
- Add `--flake` CLI argument and `flake` configuration file option - Generate a minimalistic `flake.nix` template in the output directory - Format the generated file automatically using the configured formatter
figsoda
left a comment
There was a problem hiding this comment.
this is too opinionated imo, there isn't one convention to make a flake
nix-init is only supplying the description here, you can probably just run cp or something like that in addition to nix-init
The flake is primarily here for convenience. Using nix-init to run programs through a flake is much more convenient. And since flake code style is somewhat subjective — which I agree with. I've kept this one as minimalistic as possible |
there is a thin balance between heavy |
choosing to be minimalistic here is itself subjective, and this is one of the decisions that i don't want nix-init to make
i think finding a balance is being opinionated, what is the right balance is up to personal preference even if we agree on being minimalistic / not using stuff like flake-parts, there are still a lot of small decisions to make, nix-init is by no means completely opinionated, i try my best to follow the consensus on things, but there are some things (e.g. where |
--flakeCLI argument andflakeconfiguration file optionflake.nixtemplate in the output directory