Using nixbuild.net as a Substituter¶
You can set up Nix to use nixbuild.net as a substituter on your local machine or CI builder. This can improve performance in some situtations, and it is very useful in custom CI setups where you want to integrate nixbuild.net. Note that even if you set up nixbuild.net as a substituter, you still need to use an SSH key to access it.
To set up nixbuild.net as a substituter, first fetch your public signing key through the shell:
nixbuild.net> settings signing-key-for-builds --show
signing-key-for-builds nixbuild.net/bob-1:8tJU22/XxyINhP+wM65gwSIlg0rrQrmWhFf5+8u8F/s=
Then add the substituter and signing key to your existing configuration in
nix.conf
:
substituters = ... ssh://eu.nixbuild.net
trusted-public-keys = ... nixbuild.net/bob-1:8tJU22/XxyINhP+wM65gwSIlg0rrQrmWhFf5+8u8F/s=
You can use trusted-substituters instead of substituters to not use nixbuild.net as a substituter by default, but make it available for selection on the command line.
Note, if you have configured your nixbuild.net signing keys yourself, you will need to make sure that any public keys you have used are set up as trusted in your Nix clients. For more information on how signing keys are used in nixbuild.net, see the signing keys docs.