What are the sources for head covering in Jewish literature?
אמר רב נחמן תיתי לי דקיימית שלש סעודות בשבת אמר רב יהודה תיתי לי דקיימית עיון תפלה אמר רב הונא בריה דרב יהושע תיתי לי דלא סגינא ארבע אמות בגילוי הראש אמר רב ששת תיתי לי דקיימית מצות תפילין ואמר רב נחמן תיתי לי דקיימית מצות ציצית
Rav Naḥman said: May I receive my reward because I fulfilled the obligation to eat three meals on Shabbat magnificently. Rav Yehuda said: May I receive my reward because I fulfilled the obligation of consideration during prayer. Rav Huna, son of Rav Yehoshua, said: May I receive my reward because I never walked four cubits with my head uncovered. Rav Sheshet said: May I receive my reward because I fulfilled the mitzva of phylacteries magnificently. And Rav Naḥman said: May I receive my reward because I fulfilled the mitzva of ritual fringes magnificently. d
How about for prayers?
(ו) צְנִיעוּת גְּדוֹלָה נוֹהֲגִים תַּלְמִידֵי חֲכָמִים בְּעַצְמָן. לֹא יִתְבַּזּוּ וְלֹא יִתְגַּלּוּ רֹאשָׁן וְלֹא גּוּפָן.
(6) The disciples of the wise conduct themselves with an abundance of privacy. They should not degrade themselves; and they should not uncover their heads and not their bodies.
(א) שְׁמוֹנָה דְּבָרִים צָרִיךְ הַמִּתְפַּלֵּל לְהִזָּהֵר בָּהֶן וְלַעֲשׂוֹתָן. וְאִם הָיָה דָּחוּק אוֹ נֶאֱנַס אוֹ שֶׁעָבַר וְלֹא עָשָׂה אוֹתָן אֵין מְעַכְּבִין. וְאֵלּוּ הֵן. עֲמִידָה. וְנֹכַח הַמִּקְדָּשׁ. וְתִקּוּן הַגּוּף. וְתִקּוּן הַמַּלְבּוּשִׁים. וְתִקּוּן הַמָּקוֹם. וְהַשְׁוָיַת הַקּוֹל. וְהַכְּרִיעָה. וְהִשְׁתַּחֲוָיָה:
(1) In reciting prayers, eight points should be heeded and observed. If, however, these were disregarded, owing to stress, or disability or even wilfully, the recital of the prayers would not be debarred [deemed ineffective]. The points are as follows: one should stand; with face towards the Temple; the body should be in correct posture; the clothing adjusted; one should stand in a proper place; the voice should be properly modulated; and genuflection and prostration be correctly performed.
(ה) תִּקּוּן הַמַּלְבּוּשִׁים כֵּיצַד. מְתַקֵּן מַלְבּוּשָׁיו תְּחִלָּה וּמְצַיֵּן עַצְמוֹ וּמְהַדֵּר שֶׁנֶּאֱמַר הִשְׁתַּחֲווּ לַה׳ בְּהַדְרַת קֹדֶשׁ. וְלֹא יַעֲמֹד בִּתְפִלָּה בַּאֲפוּנְדָתוֹ, וְלֹא בְּרֹאשׁ מְגֻלֶּה,
(5) Adjustment of the dress. Before beginning the Service, the dress should first be adjusted and the personal appearance made trim and neat, as it is said, "O worship the Lord in the beauty of holiness" (Psalms 96:9). One should not stand in prayer wearing a moneybelt, nor bareheaded,
(ג) יש אומרים שאסור להוציא הזכרה מפיו בראש מגולה וי"א שיש למחות שלא ליכנס בב"ה בגלוי הראש:
(3) There are those that say that it is forbidden to bring remembrance from one's mouth [i.e. say God's name] with an uncovered head. And there are those that say that one should protest against entering a synagogue with an uncovered head.
He learns this from the following source.
(Masekhet Soferim "The Tractate of the Scribes" is a non-canonical Talmudic tractate dealing especially with the rules relating to the preparations of holy books, as well as with the laws of Torah reading.)
(טו) ו מי שראשו מגולה פורס את שמע ויש אומרים ..אבל לא בראשו מגולה אינו רשאי להוציא אזכרה מפיו .. אבל אינו קורא בתורה ואינו עובר לפני התיבה ואינו נושא את כפיו:
(ב) סדר עטיפתו כדרך בני אדם שמתכסים בכסותן ועוסקים במלאכתם פעמים בכיסוי הראש פעמים בגלוי הראש ונכון שיכסה ראשו בטלית:
(2) The order of wrapping is like the way that a person covers his head for work. Sometimes his head is covered and sometimes his head is exposed. And it is correct to cover the head with the fringed garment.
(ג) ונכון שיכסה ראשו בטלית. בטור כתב ומכסה ראשו שלא יהיה בגלוי הראש ופי' בו ב"י שלא יהיה בגלוי הראש מטלית של מצוה שצריך שיכסה ראשו בציצית לקיים מצוה מן המובחר עכ"ל וז"ל ד"מ אף כי מצוה לשמוע דברי ב"י ופירושו מ"מ נ"ל דמ"ש רבינו הוא כפשוטו שלא יהיה בגילוי הראש כי בלא ציצית אין איסור לילך בגילוי הראש רק מדת חסידות כמ"ש בסי' ב' בשם הר"ם ולכן כתב בשעת עטיפת ציצית צריך לכסות ראשו עכ"ל. ולענ"ד דאדרבה בא רבינו להזהיר שיהיה נזהר כ"כ בכיסוי הראש שאפילו בשעה שמעוטף בטלית של מצוה צריך שלא יזוז ממנו כסוי של ראשו. והטעם שטלית של מצוה פעמים הוא מסולק מראשו כמ"ש רבינו בשם העיטור ונמצא שיהיה אז בגילוי הראש אבל לא הקפיד רבינו שיהיה הטלית ג"כ על הראש מטעם מצות ציצית. ובענין עיקר הדבר אם יש איסור להיות בגלוי הראש כתב רש"ל בתשו' סי' ע"ב דאין איסור מצד הדין דלא כמהרא"י ... וכתב עוד דמדת חסידות הוא לבד מדאמרינן פ' כל כתבי תיתי לי דלא מסגינ' ד"א בגילוי הראש ודוקא הליכת ד"א ומסקנתו דמ"מ אפילו בלא תפלה יש ליזהר ונראה לי שיש איסור גמור מטעם אחר דהיינו כיון שחוק הוא עכשיו בין העכו"ם שעושין כן תמיד תיכף שיושבין פורקין מעליהם הכובע ואם כן זה נכלל בכלל ובחוקותיהם לא תלכו כ"ש בחוק זה שיש טעם דכיסוי הראש מורה על יראת שמים כההיא דסוף שבת כסי רישך כי היכי דליהוי עלך אימתא דמרך וכן בקדושין דף ל"ג ההוא גברא דלא מכסי רישי' אמרו כמה חציף האי גברא כו'
.
(א) שצריך לחזור אחד הידור מצוה בקנית האתרוג ובו סעיף אחד:
אם קנה אתרוג שראוי לצאת בו בצמצום כגון שהוא כביצה מצומצמת ואח"כ מצא גדול ממנו מצוה להוסיף עד שליש מלגיו בדמי הראשון כדי להחליפו ביותר נאה ויש מי שאומר שאם מוצא שני אתרוגים לקנות והאחד הדור מחבירו יקח ההדר אם אין מייקרים אותו יותר משליש מלגיו בדמי חבירו: הגה מי שאין לו אתרוג או שאר מצוה עוברת אין צריך לבזבז עליה הון רב וכמו שאמרו המבזבז אל יבזבז יותר מחומש אפי' מצוה עוברת [הרא"ש ורבינו ירוחם נ"י ח"ב] ודוקא מצות עשה אבל לא תעשה יתן כל ממונו קודם שיעבור [הרשב"א וראב"ד] [וע' לקמן סוף סי' תרנ"ח בהגה]:
(1) If one bought an Esrog which is barely the proper size, e.g. it is barely the size of an egg, then found a larger esrog it is a Mitzvoh to buy the second Esrog if it is up to a third more expensive then the price of the first one. There are those who say that if one finds two Esrogim for sale and one is nicer then the other he should spend up to a third extra for the nicer Esrog. Rema: One is not obligated to spend an exorbinant amount for an Esrog or any other transient Mitzvoh as we are taught "He who wishes to spend shoud not spend more than a fifth of his wealth" this is true even though if he misses the opportunity for the Mitzvoh he will not be able to make it up later. (Rosh and Rabbeinu Yeruchem). This is only true by a positive commandment. To avoid transgressing a negative one must give away all of their money (Rashba and Raavad) See the end of Siman 658 (in the comment of the Rema)
If to wear a kippah is a midat chasidut or a positive commandment one would be exempt from wearing a kippah, however according to the Taz it is a negative commandment thus one would not be allowed to keep his job if he can't wear his kippah.
Rav Moshe Feinstein holds that the rationale of the Taz does not apply today, as society in general don't cover their heads due to religious beliefs unlike in the times of the Taz.
The Minchat Yitzchok writes that each case needs to be addressed by a Rabbinic authority.

