Some notes on nix flakes

Some notes on nix flakes

Julia Evans
@b0rk that's neat! I agree that more often than not, finding documentation about nix flakes will direct you towards obscure github issues :/ what you got there is almost like a NixOS configuration.nix file, it's cool that it works for you in this case!!! thanks for writing this!
@fen oh is that what nixos-rebuild is
@b0rk i won't pretend to know the inner workings of nixOS, but yeah, pretty much! there's an array in configuration.nix with all the packages you want system-wide, and part of the build process is creating an environment where all of these programs are on the path
@b0rk nixos-rebuild basically is your shell script on a lot of steroids. What nixos-rebuild does really nice is managing "generations". Whenever you change something about your configuration, and "switch" to it, i.e. activate it, you can then roll back to exactly what you had before (or even earlier generations) with one nixos-rebuild command.
The configuration.nix file is just the default location nixos-rebuild looks for a nix file that defines the system.
The home-manager script also has very similar capabilities by the way.