I'm not a fan of nix but I'd say the nixos repository is fairly mature.
source: https://repology.org/
Alpine also sounds like a nice system but I'd bet it has an even worse issue with bad packages because of musl.
...I sometimes wonder how the world would be if the "explicitly installed packages" functionality was better exposed and advertised. I never see any guide for "installing development dependencies" use things like "pacman -S --asdeps" so you can clean them up later.
Still not as good as something like npm's `package.json` where it's a human edited list of packages you want installed and it's in the order that you added them in (if you ran `npm install $package-name`). Which is nice when you want to remove one you don't need anymore.
I wonder if it's possible hack a declarative package manger into a Debian system. Like a wrapper around apt that can do all of this.