Either you write the dotfile directly in your config (Nix syntax) or you write the file like normal, and then tell HM to store it. I like the second version better, as I find it more natural.
The problem with the "baking" approach is that it is very annoying to do a small change to a config: you have to rebuild the system every time.
[1]: https://rycee.net/posts/2017-07-02-manage-your-home-with-nix...
2. you don't need to "translate" any existing config files, it's perfectly fine to use them as-is.
What about application files? I.e. backing-up/restoring firefox. In it's simplest form it's copying ~/.mozilla which I appreciate is no different than copying a dot file. Does nix have a way to restore app artifacts?
> Does nix have a way to restore app artifacts?
Not really. The Nix store is read-only, so if your dotfiles are in the Nix store, running applications can't write to them. There's a lot of stuff in ~/.mozilla that Firefox expects to write to during operation. There are aspects of Firefox that you can configure in Nixpkgs, including bundling extensions and setting defaults, but ~/.mozilla is not like ~/.vimrc, so it's not suitable to generation by Nix in the same way.
At least for me, this is even better than backup/restore. Generally I don't want to preserve cache or cookies between installations, I just want my config there.
Yeah, I agree. NixOS even includes a module for easily hosting your own Firefox Sync server, too! So I guess in terms of use cases the solution is actually more or less complete.