I'm also using NixOS for my NAS, you should look into quadlets (docker containers managed by systemd) to manage containers with nix.