Are you managing dotfiles in rootless containers? IMO you shouldn’t install nix in a container. If you want to customize your container, run nix outside of the container and tell home manager to apply itself to the container’s file system (home-manager build will put the result into a result directory, which you can copy). Or, you could just mount your host ~/.config on the container maybe.
Ansible
Ansible is a big project, but at the end of the day it’s just a Python package. If you already have Python installed, it’s not really adding that much.
Also obligatory advice for anyone new to Nix: use flakes. Flakes are good and right. It sucks that Nix is in a confusing transition process to flakes, but if you just adopt them completely from the start it makes everything easier. Your home manager config can live in a single flake somewhere that you find convenient, and you can apply it from there.