nix-on-droid icon indicating copy to clipboard operation
nix-on-droid copied to clipboard

modules/nix: use structural `settings` (Nix RFC 42)

Open ShamrockLee opened this issue 2 years ago • 7 comments

This patch ports the structural settings from nixos/nix-daemon (https://github.com/NixOS/nixpkgs/pull/139075) and adjust the description based on those from previous options and the Home Manager nix.settings option (https://github.com/nix-community/home-manager/pull/2718).

If applied, users could specify their nix.conf configuration in a structural way, using attribute names identical to the official documentation of Nix, and merge the corresponding attributes from different modules. We don't have to add or change any of the attributes manually when nix.conf configuration options are added / changed upstream given that the configuration format is kept consistent.

The specified configurations are automatically checked using the specified Nix package. The checks can be partially or fully opt out with the checkAllError and checkConfig options.

ShamrockLee avatar Jul 02 '23 21:07 ShamrockLee

Seems to function fine, please address the comments from the previous review.

t184256 avatar Jul 14 '23 13:07 t184256

Sorry, for late respond. I'm working on an oral presentation for a conference about Nix, and will not be responsive until August.

ShamrockLee avatar Jul 24 '23 10:07 ShamrockLee

Oh, sure, no rush, take your time (and consider sharing the talk =).

t184256 avatar Jul 24 '23 10:07 t184256

Are you still interested in mainlining this?

t184256 avatar Feb 14 '24 21:02 t184256

Oh! I almost forgot about this one.

ShamrockLee avatar Feb 15 '24 16:02 ShamrockLee

Since then, things like the Nix settings and Nix flake registries have been splitted from nix-daemon.nix to their own module file (nix.nix and nix-flakes.nix). It would be great to reuse them.

ShamrockLee avatar Feb 15 '24 16:02 ShamrockLee

#329 demonstrates the possible strategy to reuse the upstream macro files.

ShamrockLee avatar Feb 15 '24 21:02 ShamrockLee