!avYyleMexqjFHoqrME:nixos.org

Nix Documentation

422 Members
Discussion about documentation improvements around the Nix ecosystem86 Servers

Load older messages


SenderMessageTime
26 Oct 2022
@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
@b:chreekat.netchreekatLike without flakes, you have to write a program to compute your out-of-tree dependencies. With flakes, you just list them15:14:30
@joepie91:pixie.townjoepie91 πŸ³οΈβ€πŸŒˆ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:pixie.townjoepie91 πŸ³οΈβ€πŸŒˆ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:pixie.townjoepie91 πŸ³οΈβ€πŸŒˆthat sort of thing15:15:35
@joepie91:pixie.townjoepie91 πŸ³οΈβ€πŸŒˆso flakes then basically serve as a sort of package management system for Nix expressions, a meta-package-manager15:16:02
@b:chreekat.netchreekatSo it.. makes it easier to specify your package's dependencies?15:17:27
@joepie91:pixie.townjoepie91 πŸ³οΈβ€πŸŒˆspecifically in those circumstances where those dependencies are specified in a different package set :)15:19:20
@joepie91:pixie.townjoepie91 πŸ³οΈβ€πŸŒˆit does also have some more general-purpose benefits in terms of a standardized structure for expressions15:19:37
@b:chreekat.netchreekatThat 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 less15:19:50
@joepie91:pixie.townjoepie91 πŸ³οΈβ€πŸŒˆbut that was afaik not the primary motivation behind its design15:19:52
@joepie91:pixie.townjoepie91 πŸ³οΈβ€πŸŒˆwell, it's roughly analogous to having different repositories configured on another distro15:20:10
@joepie91:pixie.townjoepie91 πŸ³οΈβ€πŸŒˆexcept without all the breakage that that brings :p15:20:17
@b:chreekat.netchreekatIt 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:pixie.townjoepie91 πŸ³οΈβ€πŸŒˆyeah15:21:18
@b:chreekat.netchreekatI guess I'm thinking of it as a packager, somebody bundling up my software for distribution15:21:43
@b:chreekat.netchreekatmy own software*15:21:53
@joepie91:pixie.townjoepie91 πŸ³οΈβ€πŸŒˆ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 example15:22:33
@joepie91:pixie.townjoepie91 πŸ³οΈβ€πŸŒˆ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 audiences15:23:19
@b:chreekat.netchreekatMaybe 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
@b:chreekat.netchreekat * 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
@b:chreekat.netchreekatmm gotta go, no time awareness today and things to do15:27:42
27 Oct 2022
@fricklerhandwerk:matrix.orgfricklerhandwerk 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
@b:chreekat.netchreekat fricklerhandwerk: yeah 07:11:23
@domenkozar:matrix.orgDomen KoΕΎarShould I setup flakes.nix.dev?13:33:24

There are no newer messages yet.


Back to Room ListRoom Version: 6