Skip to content

nixos-rebuild build --flake and nixos-rebuild build --flake . produce different results #101648

@colemickens

Description

@colemickens

Describe the bug

Steps To Reproduce

❯ nixos-rebuild build --flake
❯ echo $?
1
# no idea what happened, but it wasn't good
❯ nixos-rebuild build --flake .                               
building the system configuration...
error: --- Error --------------------------------------------------------------------------------------------------------- nix
flake 'git+file:///home/cole/code/nixos-flake-example?ref=master&rev=72f39dbc313b395437e892f722d270a50e9c995b' does not provide attribute 'packages.x86_64-linux.nixosConfigurations."slynux".config.system.build.toplevel', 'legacyPackages.x86_64-linux.nixosConfigurations."slynux".config.system.build.toplevel' or 'nixosConfigurations."slynux".config.system.build.toplevel'

Expected behavior

I expected them to do the same thing, or the former to throw an error.

nix (Nix) 3.0pre20200829_f156513

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bugSomething is broken2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md6.topic: documentationMeta-discussion about documentation and its workflow6.topic: flakesThe experimental Nix feature6.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