Quantum thermodynamics with nanospintronic devices