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

Add command that output system information like nix-info #3085

Open
davidak opened this issue Sep 4, 2019 · 3 comments
Open

Add command that output system information like nix-info #3085

davidak opened this issue Sep 4, 2019 · 3 comments

Comments

@davidak
Copy link
Member

davidak commented Sep 4, 2019

nix-info is kind of an official tool since its used in nixpkgs issues, but it has some issues.

For example:

  1. It fails when the channel hasn't been populated. (for examples in iso images made by nixos-generators)
[root@targets-host:~]# nix run nixpkgs.nix-info -c nix-info -m
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels/nixos' does not exist, ignoring
warning: Nix search path entry '/nix/var/nix/profiles/per-user/root/channels' does not exist, ignoring
error: file 'nixpkgs' was not found in the Nix search path (add it using $NIX_PATH or -I)

[root@targets-host:~]# nix-channel --list
nixos https://nixos.org/channels/nixos-19.03
  1. It doesn't report the nixpkgs version that was used to build the current system. Which is what we are interested in for nixos bug reports.

  2. nix run nixpkgs.*** don't work when you use a channel but have no internet connection.

Including an official command in Nix would solve 1 and 3. An output for 2 can be added.

I think it shouldn't be part of nix doctor to only output problems there, but add another command, maybe nix info or nix system?

Initially reported at nix-community/nixos-generators#37

@stale
Copy link

stale bot commented Feb 18, 2021

I marked this as stale due to inactivity. → More info

@stale stale bot added the stale label Feb 18, 2021
@stale
Copy link

stale bot commented Apr 28, 2022

I closed this issue due to inactivity. → More info

@stale stale bot closed this as completed Apr 28, 2022
@thufschmitt thufschmitt reopened this Feb 24, 2023
@srid
Copy link

srid commented Mar 30, 2023

I'd also suggest adding a flag to output this information as JSON. So nix info --json can be run and parsed by other programs to extract the relevant information.

@stale stale bot removed the stale label Mar 30, 2023
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

3 participants