Nixos revison (and date)

How to get (easily) the date for a revision

You can always view the commit on GitHub, unless you need to get the information programmatically:

I would prefer to retrieve the date from within the (meta-)data of the installed system

If you have a local checkout, use git to find it out. I’m pretty sure there are ways to format the output of a git show down to only have the date.

Alternatively you should be able to use the GH CLI if you haven’t a local clone:

$ gh api repos/nixos/nixpkgs/commits/72783a2d0dbbf030bff1537873dd5b85b3fb332f | jq .commit
{
  "author": {
    "name": "Martin Weinelt",
    "email": "mweinelt@users.noreply.github.com",
    "date": "2022-09-25T12:12:58Z"
  },
  "committer": {
    "name": "GitHub",
    "email": "noreply@github.com",
    "date": "2022-09-25T12:12:58Z"
  },
  "message": "Merge pull request #192858 from gador/backport-octoprint-1.8.3-22.05",
  "tree": {
    "sha": "c1c13261fb96c53b8ff115bf941e365119ada1ed",
    "url": "https://api.github.com/repos/NixOS/nixpkgs/git/trees/c1c13261fb96c53b8ff115bf941e365119ada1ed"
  },
  "url": "https://api.github.com/repos/NixOS/nixpkgs/git/commits/72783a2d0dbbf030bff1537873dd5b85b3fb332f",
  "comment_count": 1,
  "verification": {
    "verified": true,
    "reason": "valid",
    "signature": "-----BEGIN PGP SIGNATURE-----\n\nwsBcBAABCAAQBQJjMEXKCRBK7hj4Ov3rIwAAC+UIAKUERdUORWx11Jj4fnEcxD9p\nYMmFwHrJyBbySwGH2mZIh/Pjs3i5r13H9v2RRtsizXjhvfULcw6t19rAKgpcN1ic\nt3O6amKPtO3/hIZxcXAQqAf9PGUyqw5PCAyBZ6Dp5jn9P7/Ks1l2xSHTtnlDnwY3\nALgnOqgLztvnCW4OYSpnHLLwNuBmZWTlNo+oPCfenzcTo5hVnQqwC0kH5vJq3aDG\nu3W505AQ7BbS/HB165B28YwYRR92WZP8sxza33qEw3Mg23FRo/8eUD1xf9XGACHp\nVEqbzFO9ABuHSi436H7uj6qCxFrMFUU1jXqxmCTTnK+VjSRGxFy9DHcd0AYrdyY=\n=Wny2\n-----END PGP SIGNATURE-----\n",
    "payload": "tree c1c13261fb96c53b8ff115bf941e365119ada1ed\nparent d88db8f1f529aa95d854c1e359e4b3eec5e539b3\nparent 30b404ddafb52c2bdd613e58dcd3376167fc6f36\nauthor Martin Weinelt <mweinelt@users.noreply.github.com> 1664107978 +0200\ncommitter GitHub <noreply@github.com> 1664107978 +0200\n\nMerge pull request #192858 from gador/backport-octoprint-1.8.3-22.05\n\n"
  }
}