Hi,
I’m pondering the question in title. Let’s say I want to know which NixOS kernel package is currently installed and used. I know I can check kernel version with uname -a or other various ways and deduct that it’s linuxPackages_latest that pulls linux-X.YY.ZZ etc. But I feel compelled to find a way to untangle this using repl or other nixos ‘facility’. Is it possible? All I could find in my system flake using repl was config.boot.kernelPackages.kernel.pname and config.boot.kernelPackages.kernel.version - both of them are useless in this scenario. Looking into nix store is also futile - readlink -f /run/current-system/kernel gives linux-X.YY.ZZZ/bzImage path, without any clue from what it was derived.
And a follow up question - if it’s possible somehow - perhaps there is a tool that I could use to check installed packages somehow? I know that I can grep them from my system flake due to declarativeness, but I’d love something akin of nh os switch output that would show me each package + version + how many times it’s used etc.
Thanks in advance!