Closed Misterio77 closed 1 year ago
This should help us with adding comments: https://github.com/NixOS/nixpkgs/pull/224456
Hey @Infinidoge, I think it'll still take a while to merge the comments PR, do you think we can perhaps merge this one as-is? I can work on the comments later.
Once again sorry for this taking so long! Thank you very much for the contribution, and for your patience with me!
Building upon https://github.com/Infinidoge/nix-minecraft/pull/18.
Diff from #18 to this: https://github.com/Infinidoge/nix-minecraft/compare/Misterio77:deref-symlinks...Misterio77:file-formats
So, basically file/symlink items can now either be:
value
(that can be any sort of list/attrset) and aformat
(such aspkgs.formats.json { }
).format
may be null, in this case it will be infered (if possible) from the filename.This is really really convenient for writing configuration files, as you can simply do them in nixlang without having to call any sort of function to write it.
Here's a real-world example:
A nice consequence is that
whitelist.json
,server.properties
, andeula.txt
also don't have to be manually written withwriteText
.TODO: document this in
files
andsymlinks
descriptions.