**THIS IS AN UPDATE FROM MY PREVIOUS ANSWER, SINCE A LOT HAVE CHANGED IN ELEMENTARY FREYA**

*Note that this answer uses ppas, which isn't advisable in a elementaryOS set up. However, to my knowledge, there is not an alternative way to do this. Thus, the instructions.*

This is how I managed to install bumblebee and the nvidia driver in elementary OS. Unfortunately, I am unable to properly install any version higher than nvidia-355. Every attempt to install nvidia official drivers or xorg-edgers drivers or any other driver different from the 355 ended up with black screen.

I was helped by the fact that I installed [Timeshift](http://www.teejeetech.in/p/timeshift.html) in my machine. I would strongly encourage everyone to do that before trying to mess with the graphics driver. The funny thing is that I have done several installations of the driver in Ubuntu machines before, for some reason it is a lot harder to do it on elementary OS. 

**Only follow this instructions if you can afford losing everything in you machine, do it for your own risk, ok?**

Run your first backup using [Timemshift](http://www.teejeetech.in/p/timeshift.html).

## Install opengl stable ppa & the graphics-drivers ppa

For some reason the bumblebee package on the repos do not work properly, the deamon keeps turning off. There is no need to install xorg-edgers ppa anymore.

The solution I found is to use the opengl+graphics-drivers stable ppas. 

    sudo add-apt-repository ppa:graphics-drivers/ppa -y
    sudo add-apt-repository ppa:oibaf/graphics-drivers -y
    sudo apt-get update
    sudo apt-get install bumblebee nvidia-355


Then you have to make sure the bumblebee.conf is properly set:

    sudo nano /etc/bumblebee/bumblebee.conf

and add the modify as follows ( [source](http://askubuntu.com/questions/549915/how-to-install-nvidia-drivers-with-bumblebee-on-ubuntu-14-04) ):

    [bumblebee] section: after "Driver=" insert "nvidia"
    [nvidia-driver] section: after "KernelDriver=" insert "nvidia-XXX"
    [nvidia-driver] section: after "LibraryPath=" insert "/usr/lib/nvidia-XXX, /usr/lib/nvidia-331-updates:/usr/lib32/nvidia-XXX"
    [nvidia-driver] section: after "XorgModulePath=" insert "/usr/lib/nvidia-XXX/xorg,/usr/lib/xorg/modules"

Where XXX is the nvidia driver you have installed, in the example:  nvidia-355

In my case, a simple  `sudo service bumblebeed restart` did the job, but you may need to restart.

If anyone managed to install bumblebee with later drivers, please report how you did it in the comments and I may update this answer. It seems that gala won't work with later version in my tests.