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

nix flake show shows darwinConfigurations: unknown #617

Closed
diktomat opened this issue Mar 15, 2023 · 3 comments
Closed

nix flake show shows darwinConfigurations: unknown #617

diktomat opened this issue Mar 15, 2023 · 3 comments

Comments

@diktomat
Copy link

When using nix-darwin in a flake, nix flake show doesn't know how to display darwin configurations, and instead shows unknown. Compared with nixos configurations:

{
  outputs = {darwin, nixpkgs}: {
    darwinConfigurations.<hostname> = darwin.lib.darwinSystem {<omitted>};
    nixosConfigurations.<hostname> = nixpkgs.lib.nixosSystem {<omitted>};
  }
}
❯ nix flake show
git+file:///foo
├───darwinConfigurations: unknown
└───nixosConfigurations
    └───<hostname>: NixOS configuration
@reckenrode
Copy link

reckenrode commented Apr 7, 2023

This is a Nix limitation. nix flake show only knows how to display certain outputs (e.g., packages and nixosConfigurations), and it’s not currently extensible.

There is an open issue (NixOS/nix#6454) about adding extensibility, but a desire was expressed for a different approach than the one proposed. There is also an issue (NixOS/nix#6257) about making the output schema more flexible regarding modules and configurations, which would allow Nix to know about e.g., nix-darwin configurations (for nix flake check but presumably also nix flake show).

@roberth
Copy link
Contributor

roberth commented May 14, 2023

Regardless of plans for genericity (thanks @reckenrode for linking) this specific case has been solved for nix flake check since Nix 2.13:

EDIT: nix flake show does not recognize this yet, but nix flake check does handle it.

@Enzime
Copy link
Collaborator

Enzime commented Nov 7, 2024

Closing this as this is an upstream issue

We might reopen it if this PR ever gets merged NixOS/nix#8892

@Enzime Enzime closed this as completed Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants