Skip to content

nixos-option does not support flakes #97855

@cole-h

Description

@cole-h

Describe the bug
Running nixos-option nix.nixPath fails because I don't have a nixpkgs entry in my NIX_PATH. This requires me to use my compatibility wrapper (https://github.com/cole-h/nixos-config/tree/c02cdf4702db3e383073426396dea31c40ae6e71/compat) with -I nixpkgs=compat; otherwise, the program aborts.

To Reproduce
Steps to reproduce the behavior:

  1. nixos-option nix.nixPath without nixpkgs in NIX_PATH
  2. Observe abort due to lack of <nixpkgs/nixos>

Expected behavior
I would expect a --flake flag, just like nixos-rebuild has, to be able to e.g. nixos-option nix.nixPath --flake .#hostname.

Notify maintainers
cc @Ma27 @chkno

Metadata

  • system: "x86_64-linux"
  • host os: Linux 5.8.7-zen1, NixOS, 20.09.20200912.ac8a276-cosmere (Nightingale)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 3.0pre20200903_8a945d6
  • channels(vin): ""
  • channels(root): ""
  • nixpkgs: /home/vin/.config/nixpkgs/compat

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute:
# a list of nixos modules affected by the problem
module: installer.tools.nixos-option

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken6.topic: nixosIssues or PRs affecting NixOS modules, or package usability issues specific to NixOS
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions