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: Prevent network warning when checking config #69868

Merged
merged 1 commit into from Oct 2, 2019

Conversation

infinisil
Copy link
Member

Motivation for this change

Since version 2.3 (NixOS/nix#2949 which was
cherry-picked to master) Nix issues a warning when --no-net wasn't
passed and there is no network interface. This commit adds the --no-net
flag to the nix.conf check such that no warning is issued.

For reference, the warning is

warning: you don't have Internet access; disabling some network-dependent features

This is a purely cosmetic change.

Ping @edolstra @volth

Things done
  • Checked with nix-build nixos -A 'config.environment.etc."nix/nix.conf".source' that no warning is issued anymore
  • Checked with nix-build nixos -A 'config.environment.etc."nix/nix.conf".source' --arg configuration '{ pkgs, ... }: { nix.package = pkgs.nix.overrideAttrs (old: rec { name = "nix-${version}"; version = "2.2.2"; src = pkgs.fetchurl { url = "https://nixos.org/releases/nix/${name}/${name}.tar.xz"; sha256 = "f80a1b4f9837a8d33209f0b7769d5038335459ff4303eccf3e9217a9eca8594c"; }; }); }' that an version <2.3 still works.

Since version 2.3 (NixOS/nix#2949 which was
cherry-picked to master) Nix issues a warning when --no-net wasn't
passed and there is no network interface. This commit adds the --no-net
flag to the nix.conf check such that no warning is issued.
@infinisil infinisil merged commit 899937e into NixOS:master Oct 2, 2019
@infinisil infinisil deleted the config-check-warning branch October 2, 2019 21:15
@Ma27
Copy link
Member

Ma27 commented Oct 2, 2019

@infinisil as this I observed this on 19.09 as well, would you mind backporting this as well? :)

@infinisil
Copy link
Member Author

Sure no problem, done in 4f0e6ee

@Ma27 Ma27 added the 8.has: port to stable A PR already has a backport to the stable release. label Oct 3, 2019
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

3 participants