Updates href values for a limited collection of links on a page
There's no need to wrap this all in an IIFE. You aren't introducing any variables in the top scope, so no need to prevent them from leaking. Though it will become more useful when you follow my advice of introducing some helper functions. But even then there's no need to safe-guard the window global (as you aren't worried about the location and document globals).
Why are you running the loop backwards? Better use a looping construct that's meant for dealing with lists, like the for-of loop.
The environment variable contains a result of a regex match and is used like so:

// If production, remove any environment segments ...
if (environment === null) {


If you would translate the regex match into an actual environment name, the code would become much more self-explanatory:

if (environment === "production") {

For changing the link href value, I'd suggest extracting helper functions like stripEnvironment() and replaceEnvironment(), which could be used as:

link.setAttribute('href', stripEnvironment(href));
link.setAttribute('href', replaceEnvironment(href, environment));

If you want to have the domains and environments lists to be easily extensible, regex is probably not the best choice. Better to define them as arrays of strings which you can later transform into regexes using the RegExp constructor.
Your regexes look a bit too loose. The /sys\./ pattern would also match linksys.. You should at least anchor them at word boundary using \b.