I haven’t used Ansible but it sounds pretty much like that, basically you write out all the packages you want in a config and it builds the system from that. Very nice in terms of stability and maintainability. I’m very much an amateur so I can’t say for sure but I think the unused package issue would still exist on nix.
Shoot Mycroft got shut down? I remember looking into it a bit ago and filing that away as a future project, rip. I know Homeassistant also has one now too