Essentials
Makes' essentials will provide you with the basic functionality of a build system.
They are the building blocks
that will allow you to
define Makes jobs,
import other makes.nix
files,
among others.
Jobs
Jobs are the building blocks of the build system. They are the smallest unit of work that can be executed.
Example:
Imports
Allows you to import other makes.nix
files.
Example:
Inputs
Provides a set of inputs that can be used anywhere.
Outputs
Allows to reuse other jobs from a given job.
Example:
Cache
Configure caches to read, and optionally a Cachix cache for reading and writting.
Types:
- cache:
- extra: (attrsOf cacheExtra)
- readNixos (
bool
): Optional. Set totrue
in order to add https://cache.nixos.org as a read cache. Defaults totrue
.
- cacheExtra:
- enable (
str
): Read from cache. is read on the server. - pubKey (
str
): Public key of the cache server. - token (
str
): The name of the environment variable that contains the token to push the cache. - type: (
enum [cachix]
): Binary cache type. Can be Cachix. - url (
str
): URL of the cache. - write (
bool
): Enable pushing derivations to the cache. Requirestoken
.
- enable (
Required environment variables:
CACHIX_AUTH_TOKEN
: API token of the Cachix cache.- For Public caches: If not set the cache will be read, but not written to.
- For private caches: If not set the cache won't be read, nor written to.
Example:
Configuring trusted-users
If you decided to go with a Multi-user installation when installing Nix, you will have to take additional steps in order to make the cache work.
As the Multi-user installation
does not trust your user by default,
you will have to add yourself
to the trusted-users
in the
Nix Configuration File.