nh icon indicating copy to clipboard operation
nh copied to clipboard

implement `nixos-rebuild list-generations`

Open NotAShelf opened this issue 8 months ago • 3 comments

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                   *

NotAShelf avatar Jun 02 '24 00:06 NotAShelf