After using flakes for a month or two, here are my annoyances as an end user:
-
While there is nice support with flakes for building on different systems (
x86_64-linux
,aarch64-linux
, etc), there is no built-in support for cross-compiling, or easily specifying the system you want to cross-compile to.[flakes] Where do cross compiled packages go? · Issue #5157 · NixOS/nix · GitHub
At work we worked around this by specifying both native packages and cross compiled packages as different packages exposed by our flake, but it feels somewhat hacky.
-
There is no good way to pass options to flakes: Passing options to flakes
This seems like a really big blow to usability. Judging from that thread, it seems like passing options to
nix-build
is a relatively common thing to do. -
The
nix registry
stuff seems like it is nice, but by default it doesn’t pinnixpkgs
to a specific commit (or even a Hydra channel). This means if you do something likenix shell nixpkgs#foo
, it is possible you have to build from source, and you may just have to download the latest Nixpkgsmaster
every time.I created a thread explaining how to pin to a commit on one of the channels, but I feel like something like this should be done by default: How to pin nix registry nixpkgs to release channel
-
nix flake show
doesn’t handle IFD in a graceful way: Don't allow IFD in flakes by default by edolstra · Pull Request #5253 · NixOS/nix · GitHubInstead of immediately failing out when reaching IFD, it would be great if
nix flake show
instead displayed an error message only for those attributes that require IFD, but continued on showing the rest of the attributes defined in the flake.