TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Why did Nix adopt Flakes?

121 pointsby pushtheenvelopealmost 2 years ago

12 comments

limaalmost 2 years ago
My biggest issue with Nix flakes right now is the way it integrates with Git.<p>It insists on copying the <i>entire</i> repository into the Nix store (which makes all of its content world-readable!). Even if your flake.nix is in a subdirectory of a monorepo, the entire monorepo will be copied into the store every time!
评论 #36362928 未加载
评论 #36362753 未加载
评论 #36364309 未加载
评论 #36362674 未加载
评论 #36363328 未加载
anotherhuealmost 2 years ago
I&#x27;m a casual nixpkgs contributor. Flakes are like the embassies Nix sends out into the OSS world. Discussion about building the application are kept with the application, nuances and patches can be discussed with the actual authors.<p>Remember the debian SSH packaging snafu? The application authors weren&#x27;t involved. (edit: see below)<p>Nixpkgs is like the state department, a central unifying hub, great to bootstrap the package ecosystem (ten years old now), but it needs to spread its wings.
评论 #36362656 未加载
评论 #36362818 未加载
Reventlovalmost 2 years ago
So, did Nix actually adopt flakes ? Because last time I checked, it was still an experimental feature that everyone insists on using, but… it&#x27;s still experimental, which means you have to make effort to use it.
评论 #36363219 未加载
评论 #36364542 未加载
评论 #36363469 未加载
评论 #36364868 未加载
commandersakialmost 2 years ago
This 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.
评论 #36364087 未加载
评论 #36364170 未加载
评论 #36364954 未加载
predictabl3almost 2 years ago
Flakes rule, impure eval drools.<p>But also, my &quot;personal config&quot; has two dozen imports and overrides nixpkgs on most of those. I have a list of complaints regarding flakes that is only dwarfed by 6+ year old general nix issues, but I could never go back.
0x69420almost 2 years ago
the article does a good job of explaining why something like the flake system was necessary, but man oh man does the particular thing we wound up with have issues.<p>you 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.<p>it doesn&#x27;t help that nix&#x27;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.<p>i love nix but god damn this is the stage at which i&#x27;d take someone to couples counseling
jonhohlealmost 2 years ago
I’m surprised all of these systems combine build logic and dependency graphs in the same config. It seems like flake might be a step in understanding these things are only tangentially related.<p>I would like to see composability of graphs (and other set operations on binary package repos) integrated into more dependency management systems.<p>FreeBSD is my server of choice and I’d love to say: create a package repo with my config package and it’s dependencies and nothing more and deploy from that knowing a million other dependencies can’t be pulled in (e.g. give me a new jail that pulls from subset).<p>It’s probably something I should prototype one day.
评论 #36365807 未加载
rgoulteralmost 2 years ago
I think the second point (nix flakes avoid &#x27;stateful&#x27; channels) is the more compelling one. I don&#x27;t recall an easy way for ensuring channels on different systems pointed to the same value; and flakes basically do what Niv did. And, it&#x27;s much nicer to just install a flake, rather than having to add channels.<p>I&#x27;m glad to see the first point (flake.nix provides a consistent interface) mentioned. The consistent interface allows for the cli to be much nicer; `nix flake show` can list the outputs.
seabass-labraxalmost 2 years ago
This is a bit of a unnecessarily provocative title, since the question of whether or not to promote the &#x27;experimental&#x27; flakes system and replace the channels mechanism is still an active and controversial one in the Nix community. There hasn&#x27;t been any significant news on this front recently; this article simply explains why flakes were introduced as an experimental feature.
评论 #36362513 未加载
评论 #36362539 未加载
soupbowlalmost 2 years ago
I find the default way to work with nixos to be a lot easier to use compared to flakes. I am sure flakes are great and all but as with everything nix you can&#x27;t just integrate it into your normal flow, you have to jump all in with it. I don&#x27;t think that is a positive.
评论 #36363985 未加载
评论 #36366843 未加载
评论 #36367453 未加载
heleninboodleralmost 2 years ago
Am 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?<p>example:<p><pre><code> nix run .#cowsay -- flakes are neat </code></pre> Some explanation of what the heck this means would be really useful.
评论 #36364807 未加载
评论 #36364695 未加载
评论 #36364730 未加载
评论 #36367290 未加载
评论 #36367014 未加载
toastalalmost 2 years ago
I prefer Flakes non-Flakes, but it’s disappointing that you can’t specify mirrors unlike the fetch* commands. Things go down on the internet &amp; mirrors are a way to cover that sitution. There’s nothing like a failing CI because the one of the origin’s servers are down.
评论 #36368776 未加载