The second income is income, correct? Not just money moving around. If so, then I would just budget it when it comes in as dedicated to Students Loans. When it builds up and you do a principal payment, charge it to the student loans.
8/1- Deposit comes in $1,000 - To Be Budgeted (Student Loans)
8/15 - Regular auto debit comes out $300 - Pay from Student Loans
9/1 - Paycheck for $1,000 - To Be Budgeted (Student Loans)
9/15 - Auto debit for $300 - Charge to Student Loans
After this 2 months, you'll have 1,400 extra in that account and you can send that as a principal payment to Student Loans. That will zero out both your bank account and the Student Loan Account you have in YNAB.
If it bothers you to have Student Loans showing that much on your budget. You could make a separate category for Student Loan Principal.
8/1 - $1,000 comes in - you allocate 300 to STudent Loans, and 600 to Student Loan Principal
8/15 - $300 pays from Student Loans
.
.
9/30 - Pay 1,400 and charge to Student Loan Principal
OR, you could just take that account off the balance sheet since it's kind of self contained, if you think it's muddying the other waters.