see Nix System Manager. Of course, you'll have to be really creative with selective module imports if you want to use something as complex as Nextcloud.
nixos
All about NixOS - https://nixos.org/
https://github.com/erikarvstedt/extra-container
Let's you run nixos containers on non nixos distros. Requires a multi user install w/ a daemon.
docker container with nixos inside??
Idk who downvoted this, as its legitmately probably the most easy way for people who are familiar with docker.
Sounds like that's my best bet. My goal here was to stop using docker and use nix instead, but at least this would allow me to still use NixOS for the configuration and mostly ignore the fact that it's actually running in docker. I used the stones to destroy the stones kind of thing.
You can also use nix to get docker so, its kinda meta.
There's a tool called devbox that uses nix under the hood and has services. Probably not what you're looking for, but its nice to know there are people working on a native solution.