Rules as written, it is left to DM or the table for interpretation
Rules as written what you're supposed to do is look at Nondetection and Portent and decide for your table how it works. You're supposed to look at what the intent of Nondetection and the intent of Portent is supposed to be, which means you'll have to read and decide for yourself based on how you understand the rules and what works best for the fun and enjoyment of your table. That is 5e's rules philosophy.
I don't buy the "It doesn't say it is or it isn't, therefore it isn't." You can just as easily say, "It doesn't say it is or it isn't, therefore it is." Lack of evidence doesn't prove anything. The game rules do not claim to be comprehensive, and this is the natural consequence of that. This is the entire point the "rulings not rules" idiom is making. There is no burden of proof on Portent or Nondetection or the PHB as a whole to provide an answer. While that line of reasoning was implicit to 3e and 4e -- both editions that sought comprehensive and complete rules sets -- 5e actively does not do that. 5e D&D is often intentionally vague so as to leave rules open for interpretation and the system intentionally doesn't use keywords or raw mechanics. It does this so that players and DMs have the explicit freedom to interpret the rules for themselves and do what makes sense for that interaction. The designers know they can't possibly foresee every interaction in the rules, so they no longer try.
There is no clear answer by design. Yes, this means that asking, "What is RAW?" on RPG SE for 5e D&D is often a pointless exercise because the answer you should often get is, "RAW it depends on your table." This is why there are so many conflicting answers on RPG SE for 5e questions and why Sage Advice contradicts itself so often.
The rules are less important than the game. What Mearls and Crawford want is for players and DMs to stop asking WotC how to play and just make a decisions and play for themselves. If you make a mistake, admit it and make a correction. It's no less destructive than doing nothing until WotC makes a decision and then maybe changes their mind later.
You're expected to look at whole picture that the rules are giving you and to make a judgement call on what feels the most consistent and correct for your table. Is it reasonable for Nondetection to block Portent? Sure, it almost certainly is divination magic given that it's an ability of the Diviner subclass. How about a Ranger's Primeval Awareness? Well, that works like a spell, even consuming a spell slot, and it would have to be divination magic given the distance, so sure. How about a Paladin's Divine Sense? Hm... possibly, it's pretty close to Detect Good and Evil, but it's really described as the Paladin's senses. A Warlock's Devil's Sight? Hrm, hard to say. It's got elements that only True Seeing can accomplish, and Nondetection probably blocks True Seeing, but it's basically an improved Darkvision spell and that's not even Divination. So maybe partially? A Barbarian's Feral Instinct? Eh, that doesn't seem right, it's not magical. A Rogue's Blindsense? Yeah, probably not unless Blindsense is supposed to be magical, but I don't get that impression.
Portent overrides Lucky
Lucky allows you to choose which of two dice to use as the roll.
Whenever you make an attack roll, an ability check, or a saving throw... You choose which of the d20s is used for the attack roll, ability check, or saving throw.
Portent replaces the roll wholesale.
You can replace any attack roll, saving throw, or ability check
So lucky allows you to choose which toss of the die to use for your roll. Unbenownst to the lucky roller, portent replaces the roll entirely regardless of which die toss was selected as the roll.
Best Answer
The halfling's Lucky trait deals with the die roll (PHB, p. 28):
And so does Advantage/Disadvantage, since it refers to the same trait (PHB, p. 173):
The Divination wizard's Portent feature, on the other hand, deals with the check as a whole:
And here comes the interesting part - the three emphasized terms are only mentioned in rules as actions, not numbers:
The description of attack rolls (PHB, p. 194):
Saving throws (PHB, p. 179):
And ability checks (PHB, p. 171):
All three go the standard way:
From the strict RAW reading of Portent, we have to replace steps 1–4 (the whole check) with a number (foretelling roll), which makes no sense, as the result has to be boolean – success/failure.
If we loosen the restrictions, the logical thing to say would be "In the context of Portent, attack roll/saving throw/ability check is the number to be compared with the AC/DC" (i.e. the result of Step 3 above). In this interpretation "You must choose to do so before the roll" means that the decision is made before Step 1 and therefore no actual die roll happens. The modifiers are applied to the foretold roll as normal. This interpretation is reinforced by an unofficial tweet from March 2015 by rules designer Jeremy Crawford:
This result is Rules As Intended as well; the whole point is that the character knows in advance what is going to happen.