The [`config.installer.commands.*`](../../modules/installer.nix.md) can be used for some per-host customization, but for further reaching changes that are supposed to affect all hosts in a configuration, it may be necessary or more appropriate to extend/override the [default installer functions](../../lib/setup-scripts/).
# For example, »nixos-install-cmd $mnt $topLevel« gets called to perform the last step(s) of the installation, after the »/nix/store« contents has been copied to the new filesystems.
# Usually it just installs the bootloader, but we can hook into the function to have it do additional stuff:
copy-function nixos-install-cmd nixos-install-cmd-default # (if we still want to call the previous implementation)
function nixos-install-cmd {( # 1: mnt, 2: topLevel
# Any bash function defined in any of the setup scripts can be called as »nix run .#$hostname -- COMMAND«, but a proper COMMAND should be documented as such: