I've been playing with the nix package manager, mainly with the intention of using it to setup isolated development environments. I've written up how I used nix-shell to define a Ruby environment for building & serving my personal website locally...
https://jamesmead.org/blog/2020-07-26-a-simple-ruby-development-environment-using-nix-shell