3 ms·
> In fact, vim understands the syntaxes of a lot of dotfiles, with home manager, you even lose that. Nix is perfectly capable of referencing external text file
by chriswarbo 3y ago
> In fact, vim understands the syntaxes of a lot of dotfiles, with home manager, you even lose that.
Nix is perfectly capable of referencing external text files (e.g. `./my-config-file.ini`), which you can write with vim or whatever if you like.
It's trivial to put such files in place with Home Manager (or NixOS config) if you want, e.g.
home.file.foo.source = ./my-config-file.ini;
Home Manager is certainly overkill if that's all you're using it for; but many more things become possible thanks to its use of Nix. For example, you can run some find/replace on the file contents (say, to splice in some Nix store paths, or the results of some calculation); you can fetch arbitrary files from arbitrary locations (e.g. some other git repo); you can choose between alternative contents based on arbitrary criteria (say, CPU type, or hostname); etc.