Hacker News new | ask | show | jobs
by jsomedon 1046 days ago
I wanted to switch to nixos but current segregation between flakes and (traditional) nix features was a huge stop sign for me. Seems like this move is a good sign resolving this issue. Hope they bring things nice together -- features, doc, the community etc.
2 comments

I just started using flakes like a year and a half ago for my configs (easy nixpkgs pinning in git was worth it). No issues so far - take the plunge!
I empathise with this uncertainty. As I understand it, flakes aren't incompatible with the previous way of doing things. Rather they represent an additional feature which can be used on top of them.

For example if you have a shell.nix that you were running with `nix-shell` which defaults to using channels to obtain nixpkgs

    { pkgs ? import <nixpkgs> {} }:
      pkgs.mkShell {
      # ...
You can reuse it in your flake.nix

    devShells.${system}.default = import ./shell.nix { inherit pkgs; };
And it will use the locked nixpkgs input defined in your flake. You can run it with the new `nix develop` command, but `nix-shell` will continue to work, giving you the previous behaviour.