Need help with installing Ceiling light
So let's consider just the junction box for a second



There's 3 wires intersecting here


The hot line from a prior outlet/circuit breaker
The line to your outlet
The line to your attic light


There's room for a fourth wire here so that's what I would suggest. But you'll need to make another store run to do it. Return your 25' 14/2. My local big box sells 15', so if you can buy some 15' 14/2 do it. Then get 25' of 14/3. Now, let's get your light in (be sure to turn the power off first!)


Cut the hole for your fixture and mount the box above it. If I were you, I'd go the extra mile here and mount a box attached to a bracket, just in case you ever want to hang anything significant off it.
Put your 14/2 into the junction box in the picture above (you have an open clamp on the left side). Just attach the wires to the existing nuts as they already are (white to white, etc). Run the other end into your new fixture junction box
Cut a hole for your old work box in the drywall for the switch. Don't mount the box in just yet, just make sure it fits for now and then leave it out
Near where the 14/2 for the outlet goes into the wall, drill another hole (needs to be at least 1/2" or greater). The tricky part is you need to make sure you're in the same cavity as the hole you just cut in step 3. Once you have the hole, fish your 14/3 down here. You'll want a helper down by the hole who can grab the wire and pull it through
Before you go down, put your 14/3 into the box for your fixture (can cut it now or fish and cut below)
Inside the fixture box you'll attach the wires. White to white and bare to bare, but attach the red wire to the black wire in your 14/2 (nut this one off but leave the rest un-nutted). Leave the black from the 14/3 by itself for now.
Put your 14/3 into your switch box and mount it. When you put the switch in, attach the red and black (doesn't matter the order) and your ground. Strip the white and just put a pigtail on it. Mount the switch.
Mount your fixture. White to white and black to the 14/3 black that's by itself. Put nuts on the rest of the wires now. Don't forget to ground it!


You can turn the power back on now and your fixture should work. Why the extra white wire in the switch box? Code now requires a neutral in the box. Some modern switches need one (like wi-fi switches). The cost here isn't that much more, but it will save you a lot of hassle if you do it right now.

There's one thing I did want to note here before closing. Your outlet is a 20A outlet, but your wire is 14/2, which is 15A max. That's not safe. I would buy a 15A outlet and replace it.