That is all there is to it.
Ensure the custom mirror is used
When you setup a mirror you want to ensure your local computers use that mirror.
You need to make a special configuration for pacman-mirrors to avoid the pamac mirrorlist timer rewriting your mirror list.
Configure pacman-mirrors to use a mirror pool with only one mirror.
sudo pacman-mirrors --country dk
Then edit the resulting pool file /var/lib/pacman-mirrors/custom-mirrors.json and remove unnecessary data.
Initially the file may look like this
Remove status configs branches, last_sync and resp_time.
Modify url to point to your server.
JSON data is picky on format so ensure all brackets and braces are in place.
"protocols": [ "https" ],
Save the file and copy to a convenient location e.g. your home.
cp /var/lib/pacman-mirrors/custom-mirrors.json ~
From there you can distribute the configuration all your systems - copy the file to the same location - replacing the existing file if necessary.
cp custom-mirrors.json /var/lib/pacman-mirrors
Ensure your custom pool is never replaced
Ideally this should be done with a custom pacman-mirrors package.
The package must rebuild on python version change - but the following will work as well.
If you want to ensure the custom pool is never reset by a user running
pacman-mirrors -c all you can apply some system wide changes.
REMEMBER: Modifying system files will be reverted when the package owning the files is rebuilt.
Copy the file custom-mirrors.json as mirrors.json to /usr/share/pacman.mirrors - replacing the upstream mirror pool.
sudo cp ~/custom-mirrors.json /usr/share/pacman-mirrors/mirrors.json
Locate the file
Edit the configuration and change the URL_MIRROR_JSON and URL_STATUS_JSON to be an empty string
#URL_MIRROR_JSON = "https://repo.manjaro.org/mirrors.json"
#URL_STATUS_JSON = "https://repo.manjaro.org/status.json"
URL_MIRROR_JSON = ""
URL_STATUS_JSON = ""
Save the file.
Of course none of the above will work as expected if your systems use shiny-mirrors - only pacman-mirrors can do this.