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

implement nixos-rebuild list-generations #121

Open
NotAShelf opened this issue Jun 2, 2024 · 8 comments
Open

implement nixos-rebuild list-generations #121

NotAShelf opened this issue Jun 2, 2024 · 8 comments

Comments

@NotAShelf
Copy link
Contributor

I've recently noticed the list-generations option for nixos-rebuild that outputs a neat table of available generations. Maybe we could implement a nh os generations command as a replacement, that returns similar table of data (+ any other data that we might want) as a formatted table or JSON for parsing purposes.

For reference, here's the example output:

Generation    Build-date           NixOS version                                 Kernel         Configuration Revision  Specialisation
1689 current  2024-06-02 00:20:26  graphical-workstation-24.11.20240527.9ca3f64  6.9.1-xanmod1  dirty                   *
1688          2024-05-31 07:53:58  graphical-workstation-24.11.20240527.9ca3f64  6.9.1-xanmod1  dirty                   *
1687          2024-05-31 07:49:22  graphical-workstation-24.11.20240527.9ca3f64  6.9.1-xanmod1  dirty                   *
1686          2024-05-29 23:45:01  graphical-workstation-24.11.20240527.9ca3f64  6.9.1-xanmod1  dirty                   *
@viperML
Copy link
Owner

viperML commented Jun 2, 2024

Some time ago I planned a nh os info subcommand, perhaps we could show more useful info

@NotAShelf
Copy link
Contributor Author

What else would you like to display? I was going to pick apart the list-generations subcommand, so we can definitely add more data

@viperML
Copy link
Owner

viperML commented Jun 2, 2024

I don't know, that's why I didn't write the command in the end 🤣

Though perhaps closure size (nix path-info -Sh) and nixpkgs commit

@Vortriz
Copy link

Vortriz commented Oct 21, 2024

commenting to refloat this

@viperML viperML closed this as not planned Won't fix, can't repro, duplicate, stale Oct 21, 2024
@NotAShelf
Copy link
Contributor Author

I was working on this :(

@viperML viperML reopened this Oct 21, 2024
@NotAShelf
Copy link
Contributor Author

:)

@Vortriz
Copy link

Vortriz commented Oct 21, 2024

i have some suggestions on what all can be shown upon nh os info:

  • size of nix store (if thats useful)
  • space saved by hardlinking

@NotAShelf
Copy link
Contributor Author

Nix itself (as per my knowledge) does not report either of those stats. I can calculate the size of the Nix store, but there are already better tools (du, dust, etc.) which I am not sure if we should bother wrapping.

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