Our great sponsors
-
nix-direnv
A fast, persistent use_nix/use_flake implementation for direnv [maintainer=@Mic92 / @bbenne10]
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
flake-templates
A collection of barebone Nix shells for starting a project, provided as flake templates
You can easily transition your shell.nix (and default.nix) to a flake-based one by using flake-utils and flake-compat. The former is actually unnecessary, but I would recommend it for typical project environments. Unless you have an impure dependency, this transition would be easy.
If you are using nix-direnv (which I recommend), you can get rid of shell.nix by replacing use nix with use flake in your .envrc.
I have created flake templates for flake.nix boilerplates, so you can try it out. pre-commit template is what I use in most cases.
There is a helpful discussion at https://github.com/NixOS/nix/issues/4609 that provides some more context for why this remains so confusing.