| 26 Oct 2022 |
joepie91 π³οΈβπ | (and all of the modularity benefits that derive from that, of course) | 15:11:14 |
chreekat | I guess I just don't know what that means | 15:11:24 |
chreekat | Like, 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 π³οΈβπ | 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 expressions | 15:13:25 |
chreekat | so I'm fixated on the dependencies part because that's the only bit I think I understand so far :D | 15:13:27 |
joepie91 π³οΈβπ | that are possibly maintained by different people | 15:13:42 |
chreekat | Like without flakes, you have to write a program to compute your out-of-tree dependencies. With flakes, you just list them | 15:14:30 |
joepie91 π³οΈβπ | meaning that package definitions don't need to be so centralized in nixpkgs, utility functions can be provided and maintained outside of nixpkgs as separate flakes, software projects can provide their own flakes instead of having to put everything into nixpkgs, etc. | 15:14:55 |
joepie91 π³οΈβπ | or one could for example maintain their own package set independently from nixpkgs, while sharing the same utility functions (as long as those are published as separate flakes) | 15:15:33 |
joepie91 π³οΈβπ | that sort of thing | 15:15:35 |
joepie91 π³οΈβπ | so flakes then basically serve as a sort of package management system for Nix expressions, a meta-package-manager | 15:16:02 |
chreekat | So it.. makes it easier to specify your package's dependencies? | 15:17:27 |
joepie91 π³οΈβπ | specifically in those circumstances where those dependencies are specified in a different package set :) | 15:19:20 |
joepie91 π³οΈβπ | it does also have some more general-purpose benefits in terms of a standardized structure for expressions | 15:19:37 |
chreekat | That was a bit cheeky, sorry :D what I mean is, I think we agree on the value flakes bring, but I still don't know how I'd explain "combine package definitions from different sources" to people at my level of Nix knowledge or less | 15:19:50 |
joepie91 π³οΈβπ | but that was afaik not the primary motivation behind its design | 15:19:52 |
joepie91 π³οΈβπ | well, it's roughly analogous to having different repositories configured on another distro | 15:20:10 |
joepie91 π³οΈβπ | except without all the breakage that that brings :p | 15:20:17 |
chreekat | It sounds like you're looking at this from the NixOS+Nixpkgs perspective? Like how today it's kind of a pain to specify packages from different sources in configuration.nix (I've tried, it wasn't pretty) | 15:21:00 |
joepie91 π³οΈβπ | yeah | 15:21:18 |
chreekat | I guess I'm thinking of it as a packager, somebody bundling up my software for distribution | 15:21:43 |
chreekat | my own software* | 15:21:53 |
joepie91 π³οΈβπ | right. from that perspective it would be more "allowing you to publish Nix expressions [packages] for your own software without relying on nixpkgs maintainers", for example | 15:22:33 |
joepie91 π³οΈβπ | that's kind of the problem with a fundamental structural change like flakes; it fixes a bunch of different issues at once, but that also means that it represents something very different to different audiences | 15:23:19 |
chreekat | Maybe if it's useful to have a comparison-based description, it might still be easier first write a description of "Nix plus flakes" that just highlights all the things you can do with it? | 15:26:49 |
chreekat | * Maybe if it's useful to have a comparison-based description, it might still be easier first write a description of "Nix (with flakes)" that just highlights all the things you can do with it? | 15:27:08 |
chreekat | mm gotta go, no time awareness today and things to do | 15:27:42 |
| 27 Oct 2022 |
fricklerhandwerk | joepie91 π³οΈβπ chreekat I like your way of thinking. Would you be interested in collaborating on some flakes-related material for e.g. nix.dev? | 07:07:27 |
chreekat | fricklerhandwerk: yeah | 07:11:23 |
Domen KoΕΎar | Should I setup flakes.nix.dev? | 13:33:24 |