How to transition from shell.nix to flake.nix?

This page summarizes the projects mentioned and recommended in the original post on /r/NixOS

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • flake-utils

    Pure Nix flake utility functions [maintainer=@zimbatm]

  • 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.

  • nix-direnv

    A fast, persistent use_nix/use_flake implementation for direnv [maintainer=@Mic92 / @bbenne10]

  • 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.

  • 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.

    InfluxDB logo
  • flake-templates

    A collection of barebone Nix shells for starting a project, provided as flake templates

  • 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.

  • nix

    Nix, the purely functional package manager

  • There is a helpful discussion at https://github.com/NixOS/nix/issues/4609 that provides some more context for why this remains so confusing.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts