How do I switch to renamed Nix options?

I am on unstable channel for longer than a year and it has been very good.

But yesterday I updated NixOS and got below warnings:

trace: warning: The option `nix.maxJobs' defined in `/nix/store/.../hardware-configuration.nix' has been renamed to `nix.settings.max-jobs'.
trace: warning: The option `nix.binaryCaches' defined in `/nix/store/.../cachix/nix-community.nix' and `/nix/store/.../flake.nix' has been renamed to `nix.settings.substituters'.
trace: warning: The option `nix.binaryCachePublicKeys' defined in `/nix/store/.../cachix/nix-community.nix' has been renamed to `nix.settings.trusted-public-keys'.

I am not sure how to switch to new options, because except flake.nix, these are all read-only files. I am unsure particularly about hardware-configuration.nix as every warning I have ever seen tells me to not mess with it after initial installation.

You can use nixos-generate-config --root / to regenerate the hardware configuration, ot just change the options in the file.

For cachix you’ll need to manually adjust the option names.