With a geology and mathematics degree, I figure you could probably make multiple times more working for the petroleum industry than the federal government, but I commend your desire to serve our country rather than your own pecuniary interests. Unfortunately, the federal government is broke, and getting hired on is getting harder than ever, and I suspect it will continue to get harder than ever for years, if not decades to come. Not only that, if you do get hired on, be prepared to be vilified and hated by some in the pubic who simply hate the government (because it's the "in thing" now) and who will view you with disdain and as nothing more than a jack-booted thug, especially if you work in law enforcement.
I've never worked as a law enforcement officer, but in the mid-90's I worked in federal law enforcement as a civil prosecutor for the INS (before it changed to ICE) handling drug trafficking and alien smuggling cases in immigration court. I routinely put on the witness stand Border Patrol Agents, Customs Officers, K-9 Officers, INS Deportation Officers, INS Special Agents and INS undercover special agents. I noticed a distinct difference in the presentation and preparation of the INS deportation officers and special agents compared to the other officers. Compared to the other officers, in which most had little or some college, the Deportation Officers and Special Agents were required to have college degrees and some even had master's degrees. Their testimony was always much more articulate and the immigration judges routinely gave them more credibility than the other officers. Not that the other officers were in any way lacking. It was just a noticeable difference in their courtroom presence and testimony. Whether it was due to their education, training, or just mere coincidence on my part when I had them on the stand, I don't know.
Another thing you need to be prepared for is an extensive background check. I'm not talking about the cursory check given for a CHL license. That's child's play compared to what some agencies require. My check was done by the FBI. They wanted access to credit card statements, phone bills, medical records, and everything else that anyone of us would consider a full invasion of one's privacy. They even interviewed my high school teachers and most of the neighbors they could find for all the places I lived in the preceding 10 years. Those who were divorced even had their ex-spouses interviewed and were made to grant access to any records from any marriage counselors they went to. So be prepared for some intrusiveness and be prepared to go through a comparable background check every 5 years or so - unless that policy changed since I left over 15 years ago. Also, if you owe child support, your chances of getting hired on or staying on are reduced drastically, even if you pass the rest of the background check with flying colors. Same goes if you owe a lot of credit card debt, although I think they let you slide if you owe a lot of student debt. One thing about the background check is that you can always request a copy of it through the Freedom of Information Act (FOIA) and find out what everyone said about you when they interviewed them. Like I said, each agency is different, so your background check may be much more or much less intrusive than mine was way back then.
Someone mentioned that it may be easier to get on board by going through the Border Patrol. Having worked in that field many years ago, I still think that's true. The Border Patrol Agents I worked with were top notch and most loved their jobs. They were trained to track and were experts at it. The experienced ones used to train the military on how to track. You also have to learn and pass a test on Spanish to become a Border Patrol Agent. But be prepared for some lonely and sometimes scary work. Unless their policy has changed, you may be up in the mountains at night all by yourself as you come across a group of heavily armed "coyotes" (alien smugglers) or "mules" (drug traffickers). Or you may be alone at night at some checkpoint when you come across a van loaded with what appears to be heavily armed bad guys. I've had two agents confess to me these very same scenarios. But who knows, maybe things changed since then and they no longer have to work alone. I just remember them being completely undermanned and needing a lot more resources, staff and personnel back then, but given how broke the government is nowadays, I wouldn't be surprised if it's worse now.
Most of the Deportation Officers I worked with were former military. So they were already trained in how to use firearms. But their jobs were a bit different - tracking and processing criminal aliens, most of whom were finishing up their state or federal sentence before being transferred to INS detention. They learned what all the gang signs and prison tattoos meant. At the time, they hadn't cracked the meaning of some of the Asian tattoos, though, but that was many years ago. Like the Border Patrol Agents, they were also woefully understaffed and completely overwhelmed with a mountain of work - heck, we all were. They also came across some really bad, scary dudes on that job, so be prepared for that if you go that route. I had a few threaten me but that's all part of the job. Lucky for you, you'll have your government issued firearm, hopefully a bullet-proof vest, federal self-defense training and the cadre of other officers by your side most of the time during the day if you're ever threatened. I had none of that, but fortunately none of their threats were ever carried out. Also be prepared to have a price on your head - we were informed by the FBI that we all had prices on our head from a particular drug cartel that fortunately was broken up since I left that line of work.
Good luck and hope you find a good job!