Infinidoge / nix-minecraft

An attempt to better support Minecraft-related content for the Nix ecosystem
MIT License
172 stars 18 forks source link

Add mutable whitelist and server.properties options #57

Closed matthew-salerno closed 5 months ago

matthew-salerno commented 5 months ago

As a server owner I want to be able to manage my whitelist imperatively, as it often changes. I allowed specifying null for whitelist and serverProperties to leave the files mutable when not specified, preventing overwriting with empty files. This is mainly intended for whitelists, but I also implemented it for serverProperties for completeness' sake.

Infinidoge commented 5 months ago

Heya! This is actually a redundant change. If you don't set a whitelist in the options, then normalizeFiles already filters it out, so one isn't generated.

Simply setting serverProperties.white-list = true; without specifying a whitelist in Nix will achive what you are looking for.

I believe the same goes for serverProperties, where specifying nothing won't create it in Nix, however I haven't tested that.

Infinidoge commented 5 months ago

The main thing that is needed is documentation.

matthew-salerno commented 5 months ago

Hmm I thought my whitelist was getting deleted before but I made a couple changes at once so maybe it was something else. Thank you for taking the time to clarify!