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

nixos/nix-daemon: optionally (on by default) check nix.conf can be read #39407

Merged
merged 1 commit into from May 1, 2018

Conversation

dtzWill
Copy link
Member

@dtzWill dtzWill commented Apr 24, 2018

  • checks using package providing the nix-daemon that we'll be using
  • made optional (unlike some other config checks) "just in case":
    since this requires running the new Nix on the builder, this
    won't work in a few (AFAIK very uncommon) situations such as
    cross-compiling NixOS or using include directives in nix.conf

This does rely on Nix2 but not by the builder.
Since we only offer Nix2+ in-tree this should be fine,
and may otherwise be required anyway.

#29592

  • Tested using sandboxing (nix.useSandbox on NixOS, or option build-use-sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Fits CONTRIBUTING.md.

Seems to work well on a handful of NixOS tests and when introducing
errors into my configuration and such.

Review and suggestions for testing requested! :)

* checks using package providing the nix-daemon that we'll be using
* made optional (unlike some other config checks) "just in case":
  since this requires running the new Nix on the builder, this
  won't work in a few (AFAIK very uncommon) situations such as
  cross-compiling NixOS or using `include` directives in nix.conf

This does rely on Nix2 but not by the builder.
Since we only offer Nix2+ in-tree this should be fine,
and may otherwise be required anyway.
Copy link
Member

@matthewbauer matthewbauer left a comment

Choose a reason for hiding this comment

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

Looks good! Probably don't need to wait on @edolstra - he gets a lot of review request spam.

@dtzWill
Copy link
Member Author

dtzWill commented May 1, 2018

Alright, fingers crossed :). Thanks!

@dtzWill dtzWill merged commit fdc581d into NixOS:staging May 1, 2018
@@ -349,6 +353,13 @@ in
'';
};

checkConfig = mkOption {
Copy link
Member

Choose a reason for hiding this comment

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

What's the use case for this option? When would you want to disable this check?

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

Successfully merging this pull request may close these issues.

None yet

4 participants