You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
nix-info is kind of an official tool since its used in nixpkgs issues, but it has some issues.
For example:
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
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.
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?
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.
nix-info
is kind of an official tool since its used in nixpkgs issues, but it has some issues.For example:
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.
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, maybenix info
ornix system
?Initially reported at nix-community/nixos-generators#37
The text was updated successfully, but these errors were encountered: