I can't speak about Chef, but Ansible is as far removed from declarative as is possible when compared to guix and nix.
Ansible at least doesn't lie to you about this: it provides the tools to be declarative, but doesn't pretend to understand your problems better then you.