From 79cd715f3a3fbbb31727e32de925d6e85ed8aad3 Mon Sep 17 00:00:00 2001 From: John Ericson Date: Wed, 16 Apr 2025 15:02:43 -0400 Subject: [PATCH] Add info about the store settings. --- README.md | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 833169d..480d34c 100644 --- a/README.md +++ b/README.md @@ -28,8 +28,8 @@ One of the core planks of my [steering committee candidacy](https://github.com/N - An working better for users that have limited perms --> -There are some other general goals around separating concerns in the code, modularity, and extensibility, but I think I will not get to them in the first version of this document. -I also want to talk about Windows support, but that will have to wait for later too. +There are some other general goals around separating concerns in the code, modularity, and extensibility, but I describe them in less detail so far. +I also want to talk about Windows support, but that will have to wait for a later version of this document. ## Roadmap @@ -195,6 +195,26 @@ There are some usability improvements such as But I don't think either of these will be too much work. Dynamic derivations is a relatively "cheap" extension to content-addressing derivations. +### Modularity, extensibility (and also the new CLI) + +One of my least favorite things with the new (and old CLI) is that there are way too many flags on commands, many of which seemingly are unrelated to the command in question. +There is a reason for this, however, which is that the current design of Nix actually makes it really hard to know what settings affect what operations, because the settings are stored in big globals that *any* code is able to peek at. +So to make the UI better, we need to get rid of those globals. + +Of course, this is also table stakes for making the Nix code a good library too: callers need to be in control, with no pointless external state. +This enables many novel use-cases, via projects build around Nix extending it in various ways. +Experience shows that many organisations using Nix often have special needs, e.g. special scheduling requirements. +A good library foundation allows organisations to serve their needs by themselves, without being blocked on upstream. + +For the longest time, I was stumped on how to begin this very large untangling, but in recent months I found a way. +Tackling the main configuration system head-on is just too hard: it is too entertwined with many other things. +The store settings, however, is relatively more self contained. +And as a bonus many settings should move to being store settings anyways. +[Nix#11139] successfully reworks the store settings, solving a number of problems in one big patch. +[Nix#10761] on top of that tackles the rest of the store settings. +That second PR is still very WIP, and I suspect may well end up becoming multiple PRs. +But, it is in much better shape than earlier attempts because it gets to reuse new infrastructure which is independently created and proven fit-for-use in the previous store settings overhaul. + [Nix#5025]: https://github.com/NixOS/nix/issues/5025 [Nix#8602]: https://github.com/NixOS/nix/issues/8602 [Nix#11895]: https://github.com/NixOS/nix/issues/11895 @@ -212,3 +232,5 @@ Dynamic derivations is a relatively "cheap" extension to content-addressing deri [Nix#12662]: https://github.com/NixOS/nix/pull/12662 [Nix#12591]: https://github.com/NixOS/nix/pull/12591 [Nix#12558]: https://github.com/NixOS/nix/pull/12558 +[Nix#11139]: https://github.com/NixOS/nix/pull/11139 +[Nix#10761]: https://github.com/NixOS/nix/pull/10761