you don’t have to! Just install the package
and it will use your ad-hoc dotfiles like it would on any other distro
And changes will last on reboot, y'know with the whole immutable thing?
EDIT: I couldn't find straightforward (to me) info on this even searching for stuff like 'NixOS mutable home', but after the reply to this I tried different terms and found the wiki page on impermanence. Specifically, the persisting+home managing sections:
Some files and folders should be persisted between reboots though (such as /etc/nixos/).
This can be accomplished through bind mounts or by using the NixOS Impermanence module, which will set up bind mounts and links as needed.
and
You can just make a home partition on a drive and mount it as normal, so everything in /home or /home/username will be persisted
However, then files are stored read-only in the Nix store. In order to persist files while still being writable, you can use the Home Manager Impermanence module