A few weeks ago I did already post how to get a PostgreSQL service up and running in an ad-hoc way based on the properties which ~nix-shell~ does provide. Starting a Redis service is even easier, since no configuration is required.
Here is the one line it needs to get it done:
nix-shell -p redis --command redis-server
This will go and get the package ~redis~ for you and then run the command ~redis-server~ inside of an environment where the redis package is available.