!avYyleMexqjFHoqrME:nixos.org

Nix Documentation

435 Members
Discussion about documentation improvements around the Nix ecosystem92 Servers

Load older messages


SenderMessageTime
26 Oct 2022
@sandro:supersandro.deSandro 🐧 well, it is about what flakes can do because nix just imports some source code that flakes downloaded and turns on some tighter isolation (--pure). 14:24:53
@sandro:supersandro.deSandro 🐧

Flakes replace nix-channel completely in a reproducible and manageable way, so that every project and system can use their own flake.

14:26:02
@joepie91:pixie.townjoepie91 🏳️‍🌈

chreekat: first pass at a better 'headline' description:

Flakes are a new feature of Nix, that makes it easier to combine package[?] definitions from different sources. It also allows maintainers of different sources to depend on each other, without breaking the guarantees of Nix, and without requiring you as the user to configure those dependencies manually.

thoughts?

14:48:01
@b:chreekat.netchreekat
In reply to @joepie91:pixie.town

chreekat: first pass at a better 'headline' description:

Flakes are a new feature of Nix, that makes it easier to combine package[?] definitions from different sources. It also allows maintainers of different sources to depend on each other, without breaking the guarantees of Nix, and without requiring you as the user to configure those dependencies manually.

thoughts?

I think it's getting there! Some suggestions:

  • Suggestion: "Flakes make it easier to ..."; make it timeless
  • Concern: "combine package definitions from different sources". Would it be clearer to say "make it easier to specify your package's dependencies"?
  • Concern: Who is the audience, anyway: the package author, or the package user? I know the new nix has a bunch of bells and whistles for the user, but are those because of the better dependency handling or something else?
  • Suggestion: be specific about "guarantees of Nix"
14:58:10
@b:chreekat.netchreekatEven "Flakes make it easier to..." implies the thing that came before, though. :) Newcomers won't know the difference15:00:23
@b:chreekat.netchreekat"Flakes are a mechanism for ..."15:00:39
@b:chreekat.netchreekatAlthough I do think it's useful to have a comparison to the old way15:00:59
@b:chreekat.netchreekat
In reply to @b:chreekat.net
Although I do think it's useful to have a comparison to the old way
In a fit of unproductivity today I wrote https://twitter.com/chreekat/status/1585236514241654784 for example
15:02:43
@joepie91:pixie.townjoepie91 🏳️‍🌈 chreekat: so on the point of timelessness, I think it's tricky because there are two entirely different audiences that documentation around Flakes needs to appeal to right now; one is the transitory audience which is currently used to other mechanisms and wants to learn why they should care about Flakes, whereas the other have no familiarity with Nix at all and to whom Flakes don't register as anything special. and I feel like right now it's primarily the former audience, and that will eventually erase itself over time, to a point where there's only the latter audience and "Flakes" as a feature ceases to have any meaning, because by then it's just a part of Nix and so people only need to know about the individual concepts that were introduced by Flakes (eg. a "flake"), but those are now just a part of Nix and not of "Flakes" 15:03:11
@joepie91:pixie.townjoepie91 🏳️‍🌈 so documenting "Flakes" as a feature, I think, only really makes sense with the former audience in mind; whereas documenting the features introduced by Flakes makes sense for both audiences, but requires a different approach 15:04:05
@joepie91:pixie.townjoepie91 🏳️‍🌈if that makes sense15:04:33
@b:chreekat.netchreekatI agree there are different audiences! It makes sense15:04:38
@b:chreekat.netchreekatI guess I fall on the side of just documenting the features, though, with comparisons left for blog posts or appendices. Probably 50% of today's Nix users started using Nix with flakes already present15:05:40
@b:chreekat.netchreekatat least15:05:45
@joepie91:pixie.townjoepie91 🏳️‍🌈as for the "guarantees of Nix", that should probably be a link to a more generic explanation of those, plus a reference to specific items from that link - I don't think it makes sense to inline all of the guarantees in the Flakes docs as it's relevant in many other places also15:05:58
@b:chreekat.netchreekat(though many, like me, haven't started using them yet)15:06:02
@b:chreekat.netchreekatYeah that makes sense, although in terms of writing style, I think it wouldn't hurt to add a small signpost. otoh I'm contradicting myself a bit.. of course Nix guarantees what Nix guarantees ;)15:07:42
@joepie91:pixie.townjoepie91 🏳️‍🌈
In reply to @b:chreekat.net
I guess I fall on the side of just documenting the features, though, with comparisons left for blog posts or appendices. Probably 50% of today's Nix users started using Nix with flakes already present
this actually makes me a bit uncomfortable, because from the questions/frustrations I'm seeing, Flakes aren't really ready to be recommended for new users yet...
15:07:42
@joepie91:pixie.townjoepie91 🏳️‍🌈oh yeah, hence the 'reference to item from' thing15:08:18
@b:chreekat.netchreekatI know, it makes me uncomfortable too15:08:22
@b:chreekat.netchreekatWell, back to the point, no harm in dropping my suggestion re: timelessness15:09:19
@joepie91:pixie.townjoepie91 🏳️‍🌈

Concern: "combine package definitions from different sources". Would it be clearer to say "make it easier to specify your package's dependencies"?

on this point... I don't think it'd be clearer? like, it doesn't really do that?

15:10:35
@joepie91:pixie.townjoepie91 🏳️‍🌈unless there's something I'm missing15:10:43
@joepie91:pixie.townjoepie91 🏳️‍🌈it's specifically the "dealing with different sources" that it makes easier15:11:02
@joepie91:pixie.townjoepie91 🏳️‍🌈(and all of the modularity benefits that derive from that, of course)15:11:14
@b:chreekat.netchreekatI guess I just don't know what that means15:11:24
@b:chreekat.netchreekatLike, so far I understand that flake.nix is a Nix file with a particular structure, and a flake is a file tree with a flake.nix. Furthermore, flake.nix can specify dependencies (as other flakes) and <mumble mumble>15:13:03
@joepie91:pixie.townjoepie91 🏳️‍🌈so AIUI, the motivation behind flakes is that instead of needing to have all your package definitions in a single repository, and having to do weird possibly stateful hackery (NIX_PATH, import-from-URL, ...) to work around that, there's now a first-class mechanism for establishing dependencies between, for lack of a better term, different "registries" of Nix expressions15:13:25
@b:chreekat.netchreekatso I'm fixated on the dependencies part because that's the only bit I think I understand so far :D15:13:27
@joepie91:pixie.townjoepie91 🏳️‍🌈that are possibly maintained by different people15:13:42

Show newer messages


Back to Room ListRoom Version: 6