Earlier quoted context omitted.
Doesn't this still copy the repo, but just doesn't unzip it?
I think it only lazily copies files that are referenced by your nix expression. I tested this branch, and a flake-based shell launched in 3 seconds inside a large monorepo (vs 30 seconds before). I don't think it is possible to copy this repo in 3 seconds.
Why did Nix adopt Flakes?
31–40 of 68 posts
Re: Why did Nix adopt Flakes?
#32This probably goes against the flow, but I tried NixOS on a VPS and I found the tools to be inscrutable. Was so confused about Nix packaging and whether to use Flakes.
Depends on the person. I work in a company that uses Nix for everything one could possibly imagine, and I've found there are a few types of people: 1. The purist: Is on an actual crusade to promote Nix and stomp out any competition, because, "reproducible." 2. The enthusiast: Likes using Nix to speed up development but recognizes it has a ton of shortcomings, among others being not friendly to beginners, and tends to…
I have no experience running it in production, but I imagine if you don’t want to use containers it’d be a pretty good option.
Re: Why did Nix adopt Flakes?
#33you can smell from a mile away that they were engineered to solve widely-experienced problems... as experienced by a single company, with an existing, idiosyncratic set of methodologies. and they just happened to get the blessing because eelco was at that company. unlike nix proper, however, where eelco had the entire internet for feedback, the core design of flakes ossified before the world at large had reason to care about them.
it doesn't help that nix's command-line ux is currently super splintered as a result, and while that will be ironed out in the long run, the thing in the name of which those tools got splintered is rather insulting.
i love nix but god damn this is the stage at which i'd take someone to couples counseling
Re: Why did Nix adopt Flakes?
#34So, did Nix actually adopt flakes ? Because last time I checked, it was still an experimental feature that everyone insists on using, but… it's still experimental, which means you have to make effort to use it.
Re: Why did Nix adopt Flakes?
#35example:
nix run .#cowsay -- flakes are neat
Some explanation of what the heck this means would be really useful.Re: Why did Nix adopt Flakes?
#36Am I the only one completely confused by the examples that appear to put command line arguments after shell end-of-line comments? Is that not a typical shell? example: nix run .#cowsay -- flakes are neat Some explanation of what the heck this means would be really useful.
Re: Why did Nix adopt Flakes?
#37Am I the only one completely confused by the examples that appear to put command line arguments after shell end-of-line comments? Is that not a typical shell? example: nix run .#cowsay -- flakes are neat Some explanation of what the heck this means would be really useful.
The first -- argument that is not an option-argument should be accepted as a delimiter indicating the end of options. Any following arguments should be treated as operands, even if they begin with the '-' character.
Re: Why did Nix adopt Flakes?
#38Am I the only one completely confused by the examples that appear to put command line arguments after shell end-of-line comments? Is that not a typical shell? example: nix run .#cowsay -- flakes are neat Some explanation of what the heck this means would be really useful.
To explain what's happening:
- The example above is running `nix run -- `.
- The `` here is `.#cowsay`, which is to be read as: `#`. The # is a separator here.
- The `` being `.` implies its a local flake at the current directory. The `` in this case is the output from the flake i.e. the `cowsay` program.
further fun to be found at: https://nixos.org/manual/nix/stable/command-ref/new-cli/nix....
As a meta-comment, yeah, this is kinda non-trivial for most of us. This is why we build devbox which provides a more familiar UX like `devbox add cowsay && devbox run -- cowsay "flakes are neat"`
Re: Why did Nix adopt Flakes?
#39So, did Nix actually adopt flakes ? Because last time I checked, it was still an experimental feature that everyone insists on using, but… it's still experimental, which means you have to make effort to use it.
Re: Why did Nix adopt Flakes?
#40Earlier quoted context omitted.
Depends on the person. I work in a company that uses Nix for everything one could possibly imagine, and I've found there are a few types of people: 1. The purist: Is on an actual crusade to promote Nix and stomp out any competition, because, "reproducible." 2. The enthusiast: Likes using Nix to speed up development but recognizes it has a ton of shortcomings, among others being not friendly to beginners, and tends to…
We use it for devshells, and it’s awesome. New devs install nix and direnv and they instantly have all the right versions of all of our tooling. A first day setup process is now done in minutes instead of a day. Flakes made it possible for us to package up internal and external tools and ensure consistency across a team. I have no experience running it in production, but I imagine if you don’t want to use containers…