Conditionally add values into list or map in Nix

In this post I want to show you how to conditionally add values into list or map in Nix.