Nixpkgs: nixos-option broken and 18.09 beta

Created on 3 Oct 2018  Â·  7Comments  Â·  Source: NixOS/nixpkgs

Issue description

cc @samueldr @vcunat is this a release blocker?

$ nixos-option networking.useDHCP

This attribute set contains:
error:
syntax
error,
unexpected
:,
expecting

Steps to reproduce

Run nixos-option on current 18.09 beta (7f70ebf30b8). Unstable seems to be affected too.

Technical details

Seems to be a fairly simple case of nixos-option capturing all the output of nix-instantiate, including the missing-NIX_PATH-entry warning. I'll have a look at fixing this.

  • system: "x86_64-linux"
  • host os: Linux 4.14.71, NixOS, 18.09beta696.7f70ebf30b8 (Jellyfish)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.1.1
  • channels(root): "nixos-18.09beta696.7f70ebf30b8, nixos-unstable-19.03pre154105.e1605d9b21b"
  • channels(steam): ""
  • channels(linus): ""
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

All 7 comments

Output on my system:

Value:
true

Default:
true

Example:
error: attribute 'example' missing

Description:

"Whether to use DHCP to obtain an IP address and other\nconfiguration for all network interfaces that are not manually\nconfigured.\n"

Declared by:
  "/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/tasks/network-interfaces.nix"

Defined by:
  "/nix/var/nix/profiles/per-user/root/channels/nixos/nixos/modules/tasks/network-interfaces.nix"

(Not suggesting that there is no issue, btw. )

~ $ nixos-version && nixos-option networking.useDHCP
18.09.git.c922e20 (Jellyfish)
Value:
false

Default:
true

Example:
error: attribute 'example' missing

Description:

"Whether to use DHCP to obtain an IP address and other\nconfiguration for all network interfaces that are not manually\nconfigured.\n"

Declared by:
  "/etc/nixos/nixpkgs/nixos/modules/tasks/network-interfaces.nix"

Defined by:
  "/etc/nixos/nixpkgs/nixos/modules/services/networking/networkmanager.nix"

Weird!

Works fine on 18.09.git.7f70ebf (Jellyfish) too here.

Seems to be a fairly simple case of nixos-option capturing all the output of nix-instantiate, including the missing-NIX_PATH-entry warning. I'll have a look at fixing this.

Ah, this might explain why I'm not having the issue, I set my own NIX_PATH, nothing is from the defaults.

I suppose this is just a consequence of #40165, combined with poor handling of the warning by nixos-option.

I expect this is fixed since ee582a32d25 then. I'm unable to reproduce it on 18.09beta676.66fd61163a8, even with sudo etc.

@vcunat no, it's not — this still happens when it's expanded correctly if ~/.nix-defexpr/channels doesn't exist.

@lheckemann: can you also re-test this patch: de93b32?

Yep that fixes it!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ThomasMader picture ThomasMader  Â·  65Comments

timokau picture timokau  Â·  66Comments

globin picture globin  Â·  65Comments

Infinisil picture Infinisil  Â·  146Comments

nico202 picture nico202  Â·  70Comments