Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ShamrockLee
Copy link
Contributor

@ShamrockLee ShamrockLee commented Jul 2, 2023

This patch ports the structural settings from nixos/nix-daemon (NixOS/nixpkgs#139075) and adjust the description based on those from previous options and the Home Manager nix.settings option (nix-community/home-manager#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.

Copy link
Collaborator

@t184256 t184256 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR. I'd like to apologize, I have limited availability for the first half of July, and so far I could only give it a superficial review. I do remember about it and I will return to it in a while.

modules/environment/nix.nix Outdated Show resolved Hide resolved
assert isNixAtLeast "2.2";
let

mkValueString = v:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we reuse the nixpkgs version here?

@t184256
Copy link
Collaborator

t184256 commented Jul 14, 2023

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

@ShamrockLee
Copy link
Contributor Author

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

@t184256
Copy link
Collaborator

t184256 commented Jul 24, 2023

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

@t184256
Copy link
Collaborator

t184256 commented Feb 14, 2024

Are you still interested in mainlining this?

@ShamrockLee
Copy link
Contributor Author

Oh! I almost forgot about this one.

@ShamrockLee
Copy link
Contributor Author

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.

Port structural settings from nixos/nix-daemon.

Adjust the description based on those from previous options
and the Home Manager nix.settings option.
@ShamrockLee
Copy link
Contributor Author

ShamrockLee commented Feb 15, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants