Yes, any output you can have in a flake, but you define outputs schema yourself as a module option via types.output
.
I’ll chime in just for a moment to say I see surprisingly little disagreement in this thread compared to how much communication traffic is happening here:
- Yes flakes are used a lot, which is unsurprising given the amount of advertisement and advocacy dedicated.
- Yes it would be disruptive to somehow “kill flakes”, as it would be disruptive to abruptly discontinue any sort of legacy tool or interface. We shouldn’t do that
- Yes there doesn’t seem to by any need whatsoever for flakes to live in “The Nix” code base. It’s always seemed peculiar that flakes aren’t just an external tool, and it seems the weirder now that there’s so many alternative implementations of Nix which could all be used as “backends” for such a tool…
My hindsight opinion regarding flakes (I discovered Nix much later when they were already a thing) is that I think we do have technical problems that flakes could have solved but they haven’t, and I think there is a UX problem that they do solve, but solve poorly, and the way they do they should not have required a single extra line of C++ in “The Nix” implementation.
Specifically, I think the two technical reasons we need something flakes-like are:
- A dependency injection system for composing out-of-tree projects without creating combinatorial explosions (addressed by
inputs.<name>.follows
but poorly) - A user interface for pure/hermetic evaluation
The UX issue is merely the lack of an established protocol: so a project (say disko or SNM) exposes a bunch of nixos modules, how do you figure out where are the entry points. This is simply a matter of convention: ok our top-level attrset will have this map nixosModules
, and attributes under that would be of type you can include in imports
. This doesn’t require any special features in Nix the store, the interpreter…
Technical issues flakes do not address (but maybe the misleading documentation convinces people they do):
- Exposing packages or package sets. At least this is my interpretation of tomberek’s FOSDEM talk on “units of compositionality”
- Composing out-of-tree projects in a configurable way. Cf. e.g. the “nixpkgs config should be a flake input” issue
Issues that are addressed by something other than flakes, but flakes take the credit:
- CLI UX. The nix3-command really is an improvement over the previous generation. I’ve taken on to use
nix build -f "<nixpkgs>" ...
overnix-build
or overnix build nixpkgs#...
. Nix3-path-info is much less confusing than nix-store (still not without flaws). Note thatnix build -f "<nixpkgs>"
still supports configuration using--arg
. It’s mostly profit and virtually no loss? I suppose thenix-command
wasn’t stabilized just because the implementation was entangled with with flakes? And it still does feel odd that it’s part of “The Nix” code base rather than external, but ah there’s always nits to pick.
I find it very ironic that this thread is comparing detsys Nix to devenv: an external CLI tool that wraps Nix[^1], and in case of the “Determinate Nix” an external daemon that “drives” it. That’s what flakes could’ve been, and maybe still can. That’s how we could integrate a more complex build scheduler too: by making it external…
Trying DetSys Nix, devenv
I apologize and I don’t mean to be mean but I have to say: Discord, lol
EDIT1:
[^1]: I hope I’m not misrepresenting devenv? I’m not closely familiar
EDIT2: Maybe worth mentioning that I do think there’s potential benefit to implementing lock-files outside nix-lang, and specifically in an external “dependency injection” system for reasons similar to those concerning evalModules
, but this is a discussion for a separate thread
Why do we need to copy everything to the /nix/store to maintain isolation
This is my biggest grief with flakes. Its very slow and the purity argument does not justify it with the current performance
If I am allowed to speak without getting flagged (been a while)
fwiw, that is exactly what we are going for in Ekala starting with the cornerstone, a flake replacement that actually solves the problem (provisionsally called atoms). Nix is a novel thing, it stands to reason that a somewhat novel format may be required to suite it’s ideosyncracies. I believe atom’s are this, but I’ve got a bit more work to do before being able to effectively communicate why I think so (without overloading this thread in detail, at least)
With that said, I am quite done “discussing” this non-sense again and again in circles, keep using flakes for now, assuming I reach my goals like I hope to, there will be little to no reason to do so long term, it is of little consequence (to me at least) in the interim.
P.S. My opinions don’t exactly feel welcome here, I think every post I’ve made in this discourse for the last 6 months or more has been “flagged”. You guys can just ban me you know? Until you do, I’ll just keep speaking my thoughts uncensored, because that’'s the sort of communication that will be required to actually solve these problems (and the reason, imho, why we keep going around in circles)
Flags generally come from the community, then a moderator gets a report and can remove or agree with the flag. The mods of this forum have never been particularly quick about acting on flags (I’m sure there are a ton of them), so it is your peers here that are getting your posts hidden, not the moderators. Your conflation of the flag and the ban is incorrect.
Flags generally come from the community
No, they actually come from specific people. Not from some anonymous collective. I never used the flagging feature so far.
Back to topic: I think it’s really a good sign that more experimentation starts to happen in all sorts of direction. And hopefully the new steering committee will have the courage to act on the technical situation regarding flakes.
In a way it is unfortunate that DetSys hasn’t waited with all these controversial announcements until this situation is resolved and there is actually a body of people elected and empowered to provide technical leadership.
Yes that is how the flagging feature works.
The person must have an account on this discourse instance, which is one of the main places the nix community gathers. So certainly not some “anonymous collective” or whatever you mean by that comment.
That’s your choice; obviously other community members feel differently.
This post was flagged by the community and is temporarily hidden.
Is there a roadmap for ekala? Briefly looked into it and I’m curious to try it out.
This post was flagged by the community and is temporarily hidden.
This post was flagged by the community and is temporarily hidden.
I think reference to Lix should be fine, I believe, just as references to devenv and Tvix. And all these projects relate to the technological problem with Flakes. So I’d say it makes sense to mention all projects related to the issue at hand.
But you can currently also use package sets from flakes in devenv I believe is that right? I was thinking about doing this for providing a better developer experience sometime down the road. (one that is simpler for non-nix folks to extend and work with while still packaging and distributing software with nix)
You can do that with devenv, but to make it really easy we need to switch to tvix. We’re hacking on getting there with flokli next week!
I think tvix and devenv are cool. Even if I can’t use those immediately in larger projects, I can use them in personal projects likely so I’ll try it out as it emerges.
Is there an easy way to follow your progress? Do you have a time frame for switching to Tvix entirely?
I’m obsessed with getting the scope minimized, but hard to commit to any timeframes. Sooner than you’d think!
This post was flagged by the community and is temporarily hidden.
The sentiment is clear that the middle-ground we’re in is the real problem. Whether we fix flakes, remove flakes, or stabilize flakes, nothing’s going to happen until people put in the technical work and real PR’s with solutions start appearing.
So let’s say that starts happening. We’ll pretend that I am highly motivated and knowledgeable, and I’ve decided to put something together. Where would I go to submit it and be reasonably confident it won’t be bikeshedded to oblivion? Is there anywhere in the ecosystem that new ideas can actually get a foot in the door?
This isn’t just me snarking, or unhelpfully yelling “Get it together!” from the sidelines. I am genuinely curious about the answer to this question. I want to contribute to Nix, and I want to help out. NixOS has basically changed my life and I feel like it’s only fair I give something back. But whenever I look at existing issues or PRs, all I see is a choice of which brick wall I’d prefer smashing my head against. And I get completely demotivated before even starting. Is there anywhere to enter the Nix ecosystem and feel welcome?
My first instinct was to sign up on the Discourse, and that definitely didn’t help.
This post was flagged by the community and is temporarily hidden.