.\" -*- mode: troff; coding: utf-8 -*- .TH "nix.conf" "5" "" .SH Name .LP \f(CRnix.conf\fR - Nix configuration file .SH Description .LP Nix supports a variety of configuration settings, which are read from configuration files or taken as command line flags. .SS Configuration file .LP By default Nix reads settings from the following places, in that order: .IP "1." 3 The system-wide configuration file \f(CRsysconfdir/nix/nix.conf\fR (i.e. \f(CR/etc/nix/nix.conf\fR on most systems), or \f(CR$NIX_CONF_DIR/nix.conf\fR if \fB\f(CRNIX_CONF_DIR\fR\fR is set. .IP Values loaded in this file are not forwarded to the Nix daemon. The client assumes that the daemon has already loaded them. .IP "2." 3 If \fB\f(CRNIX_USER_CONF_FILES\fR\fR is set, then each path separated by \f(CR:\fR will be loaded in reverse order. .IP Otherwise it will look for \f(CRnix/nix.conf\fR files in \f(CRXDG_CONFIG_DIRS\fR and \fB\f(CRXDG_CONFIG_HOME\fR\fR. If unset, \f(CRXDG_CONFIG_DIRS\fR defaults to \f(CR/etc/xdg\fR, and \f(CRXDG_CONFIG_HOME\fR defaults to \f(CR$HOME/.config\fR as per \fBXDG Base Directory Specification\fR. .IP "3." 3 If \fB\f(CRNIX_CONFIG\fR\fR is set, its contents are treated as the contents of a configuration file. .SS File format .LP Configuration files consist of \f(CRname = value\fR pairs, one per line. Comments start with a \f(CR#\fR character. .PP Example: .LP .EX keep-outputs = true # Nice for developers keep-derivations = true # Idem .EE .PP Other files can be included with a line like \f(CRinclude \fR, where \f(CR\fR is interpreted relative to the current configuration file. A missing file is an error unless \f(CR!include\fR is used instead. .PP A configuration setting usually overrides any previous value. However, for settings that take a list of items, you can prefix the name of the setting by \f(CRextra-\fR to \fIappend\fR to the previous value. .PP For instance, .LP .EX substituters = a b extra-substituters = c d .EE .PP defines the \f(CRsubstituters\fR setting to be \f(CRa b c d\fR. .PP Unknown option names are not an error, and are simply ignored with a warning. .SS Command line flags .LP Configuration options can be set on the command line, overriding the values set in the \fBconfiguration file\fR: .IP "\(bu" 3 Every configuration setting has corresponding command line flag (e.g. \f(CR--max-jobs 16\fR). Boolean settings do not need an argument, and can be explicitly disabled with the \f(CRno-\fR prefix (e.g. \f(CR--keep-failed\fR and \f(CR--no-keep-failed\fR). .IP Unknown option names are invalid flags (unless there is already a flag with that name), and are rejected with an error. .IP "\(bu" 3 The flag \f(CR--option \fR is interpreted exactly like a \f(CR = \fR in a setting file. .IP Unknown option names are ignored with a warning. .LP The \f(CRextra-\fR prefix is supported for settings that take a list of items (e.g. \f(CR--extra-trusted users alice\fR or \f(CR--option extra-trusted-users alice\fR). .SS Integer settings .LP Settings that have an integer type support the suffixes \f(CRK\fR, \f(CRM\fR, \f(CRG\fR and \f(CRT\fR. These cause the specified value to be multiplied by 2\(ha10, 2\(ha20, 2\(ha30 and 2\(ha40, respectively. For instance, \f(CR--min-free 1M\fR is equivalent to \f(CR--min-free 1048576\fR. .SH Available settings .IP "\(bu" 3 \fB\f(CRabort-on-warn\fR\fR .IP If set to true, \fB\f(CRbuiltins.warn\fR\fR will throw an error when logging a warning. .IP This will give you a stack trace that leads to the location of the warning. .IP This is useful for finding information about warnings in third-party Nix code when you can not start the interactive debugger, such as when Nix is called from a non-interactive script. See \fB\f(CRdebugger-on-warn\fR\fR. .IP Currently, a stack trace can only be produced when the debugger is enabled, or when evaluation is aborted. .IP This option can be enabled by setting \f(CRNIX_ABORT_ON_WARN=1\fR in the environment. .IP \fBDefault:\fR \f(CRfalse\fR .IP "\(bu" 3 \fB\f(CRaccept-flake-config\fR\fR .RS .IP \fBWarning\fR .IP This setting is part of an \fBexperimental feature\fR. .IP To change this setting, make sure the \fB\f(CRflakes\fR experimental feature\fR is enabled. For example, include the following in \fB\f(CRnix.conf\fR\fR: .LP .EX extra-experimental-features = flakes accept-flake-config = ... .EE .RE .IP Whether to accept nix configuration from a flake without prompting. .IP \fBDefault:\fR \f(CRfalse\fR .IP "\(bu" 3 \fB\f(CRaccess-tokens\fR\fR .IP Access tokens used to access protected GitHub, GitLab, or other locations requiring token-based authentication. .IP Access tokens are specified as a string made up of space-separated \f(CRhost=token\fR values. The specific token used is selected by matching the \f(CRhost\fR portion against the \(lqhost\(rq specification of the input. The actual use of the \f(CRtoken\fR value is determined by the type of resource being accessed: .RS .IP "\(bu" 3 Github: the token value is the OAUTH-TOKEN string obtained as the Personal Access Token from the Github server (see \fIhttps://docs.github.com/en/developers/apps/building-oauth-apps/authorizing-oauth-apps\fR). .IP "\(bu" 3 Gitlab: the token value is either the OAuth2 token or the Personal Access Token (these are different types tokens for gitlab, see \fIhttps://docs.gitlab.com/12.10/ee/api/README.html#authentication\fR). The \f(CRtoken\fR value should be \f(CRtype:tokenstring\fR where \f(CRtype\fR is either \f(CROAuth2\fR or \f(CRPAT\fR to indicate which type of token is being specified. .RE .IP Example \f(CR\(ti/.config/nix/nix.conf\fR: .LP .EX access-tokens = github.com=23ac...b289 gitlab.mycompany.com=PAT:A123Bp_Cd..EfG gitlab.com=OAuth2:1jklw3jk .EE .IP Example \f(CR\(ti/code/flake.nix\fR: .LP .EX input.foo = { type = \(dqgitlab\(dq; host = \(dqgitlab.mycompany.com\(dq; owner = \(dqmycompany\(dq; repo = \(dqpro\(dq; }; .EE .IP This example specifies three tokens, one each for accessing github.com, gitlab.mycompany.com, and gitlab.com. .IP The \f(CRinput.foo\fR uses the \(lqgitlab\(rq fetcher, which might requires specifying the token type along with the token value. .IP \fBDefault:\fR \fIempty\fR .IP "\(bu" 3 \fB\f(CRallow-dirty\fR\fR .IP Whether to allow dirty Git/Mercurial trees. .IP \fBDefault:\fR \f(CRtrue\fR .IP "\(bu" 3 \fB\f(CRallow-import-from-derivation\fR\fR .IP By default, Nix allows \fBImport from Derivation\fR. .IP With this option set to \f(CRfalse\fR, Nix will throw an error when evaluating an expression that uses this feature, even when the required store object is readily available. This ensures that evaluation will not require any builds to take place, regardless of the state of the store. .IP \fBDefault:\fR \f(CRtrue\fR .IP "\(bu" 3 \fB\f(CRallow-new-privileges\fR\fR .IP (Linux-specific.) By default, builders on Linux cannot acquire new privileges by calling setuid/setgid programs or programs that have file capabilities. For example, programs such as \f(CRsudo\fR or \f(CRping\fR will fail. (Note that in sandbox builds, no such programs are available unless you bind-mount them into the sandbox via the \f(CRsandbox-paths\fR option.) You can allow the use of such programs by enabling this option. This is impure and usually undesirable, but may be useful in certain scenarios (e.g. to spin up containers or set up userspace network interfaces in tests). .IP \fBDefault:\fR \f(CRfalse\fR .IP "\(bu" 3 \fB\f(CRallow-symlinked-store\fR\fR .IP If set to \f(CRtrue\fR, Nix will stop complaining if the store directory (typically /nix/store) contains symlink components. .IP This risks making some builds \(lqimpure\(rq because builders sometimes \(lqcanonicalise\(rq paths by resolving all symlink components. Problems occur if those builds are then deployed to machines where /nix/store resolves to a different location from that of the build machine. You can enable this setting if you are sure you\(cqre not going to do that. .IP \fBDefault:\fR \f(CRfalse\fR .IP "\(bu" 3 \fB\f(CRallow-unsafe-native-code-during-evaluation\fR\fR .IP Enable built-in functions that allow executing native code. .IP In particular, this adds: .RS .IP "\(bu" 3 \f(CRbuiltins.importNative\fR \fIpath\fR \fIsymbol\fR .RE .IP Opens dynamic shared object (DSO) at \fIpath\fR, loads the function with the symbol name \fIsymbol\fR from it and runs it. The loaded function must have the following signature: \f(CRcpp extern \(dqC\(dq typedef void (*ValueInitialiser) (EvalState & state, Value & v); \fR .IP The \fBNix C++ API documentation\fR has more details on evaluator internals. .RS .IP "\(bu" 3 \f(CRbuiltins.exec\fR \fIarguments\fR .RE .IP Execute a program, where \fIarguments\fR are specified as a list of strings, and parse its output as a Nix expression. .IP \fBDefault:\fR \f(CRfalse\fR .IP "\(bu" 3 \fB\f(CRallowed-impure-host-deps\fR\fR .IP Which prefixes to allow derivations to ask for access to (primarily for Darwin). .IP \fBDefault:\fR \fIempty\fR .IP "\(bu" 3 \fB\f(CRallowed-uris\fR\fR .IP A list of URI prefixes to which access is allowed in restricted evaluation mode. For example, when set to \f(CRhttps://github.com/NixOS\fR, builtin functions such as \f(CRfetchGit\fR are allowed to access \f(CRhttps://github.com/NixOS/patchelf.git\fR. .IP Access is granted when .RS .IP "\(bu" 3 the URI is equal to the prefix, .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 or the URI is a subpath of the prefix, .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 or the prefix is a URI scheme ended by a colon \f(CR:\fR and the URI has the same scheme. .RE .IP \fBDefault:\fR \fIempty\fR .IP "\(bu" 3 \fB\f(CRallowed-users\fR\fR .IP A list user names, separated by whitespace. These users are allowed to connect to the Nix daemon. .IP You can specify groups by prefixing names with \f(CR@\fR. For instance, \f(CR@wheel\fR means all users in the \f(CRwheel\fR group. Also, you can allow all users by specifying \f(CR*\fR. .RS .IP \fBNote\fR .IP Trusted users (set in \fB\f(CRtrusted-users\fR\fR) can always connect to the Nix daemon. .RE .IP \fBDefault:\fR \f(CR*\fR .IP "\(bu" 3 \fB\f(CRalways-allow-substitutes\fR\fR .IP If set to \f(CRtrue\fR, Nix will ignore the \fB\f(CRallowSubstitutes\fR\fR attribute in derivations and always attempt to use \fBavailable substituters\fR. .IP \fBDefault:\fR \f(CRfalse\fR .IP "\(bu" 3 \fB\f(CRauto-allocate-uids\fR\fR .RS .IP \fBWarning\fR .IP This setting is part of an \fBexperimental feature\fR. .IP To change this setting, make sure the \fB\f(CRauto-allocate-uids\fR experimental feature\fR is enabled. For example, include the following in \fB\f(CRnix.conf\fR\fR: .LP .EX extra-experimental-features = auto-allocate-uids auto-allocate-uids = ... .EE .RE .IP Whether to select UIDs for builds automatically, instead of using the users in \f(CRbuild-users-group\fR. .IP UIDs are allocated starting at 872415232 (0x34000000) on Linux and 56930 on macOS. .IP \fBDefault:\fR \f(CRfalse\fR .IP "\(bu" 3 \fB\f(CRauto-optimise-store\fR\fR .IP If set to \f(CRtrue\fR, Nix automatically detects files in the store that have identical contents, and replaces them with hard links to a single copy. This saves disk space. If set to \f(CRfalse\fR (the default), you can still run \f(CRnix-store --optimise\fR to get rid of duplicate files. .IP \fBDefault:\fR \f(CRfalse\fR .IP "\(bu" 3 \fB\f(CRbash-prompt\fR\fR .IP The bash prompt (\f(CRPS1\fR) in \f(CRnix develop\fR shells. .IP \fBDefault:\fR \fIempty\fR .IP "\(bu" 3 \fB\f(CRbash-prompt-prefix\fR\fR .IP Prefix prepended to the \f(CRPS1\fR environment variable in \f(CRnix develop\fR shells. .IP \fBDefault:\fR \fIempty\fR .IP "\(bu" 3 \fB\f(CRbash-prompt-suffix\fR\fR .IP Suffix appended to the \f(CRPS1\fR environment variable in \f(CRnix develop\fR shells. .IP \fBDefault:\fR \fIempty\fR .IP "\(bu" 3 \fB\f(CRbuild-dir\fR\fR .IP The directory on the host, in which derivations\(cq temporary build directories are created. .IP If not set, Nix will use the system temporary directory indicated by the \f(CRTMPDIR\fR environment variable. Note that builds are often performed by the Nix daemon, so its \f(CRTMPDIR\fR is used, and not that of the Nix command line interface. .IP This is also the location where \fB\f(CR--keep-failed\fR\fR leaves its files. .IP If Nix runs without sandbox, or if the platform does not support sandboxing with bind mounts (e.g. macOS), then the \fB\f(CRbuilder\fR\fR\(cqs environment will contain this directory, instead of the virtual location \fB\f(CRsandbox-build-dir\fR\fR. .IP \fBDefault:\fR \(ga\(ga .IP "\(bu" 3 \fB\f(CRbuild-hook\fR\fR .IP The path to the helper program that executes remote builds. .IP Nix communicates with the build hook over \f(CRstdio\fR using a custom protocol to request builds that cannot be performed directly by the Nix daemon. The default value is the internal Nix binary that implements remote building. .RS .IP \fBImportant\fR .IP Change this setting only if you really know what you’re doing. .RE .IP \fBDefault:\fR \fIempty\fR .IP "\(bu" 3 \fB\f(CRbuild-poll-interval\fR\fR .IP How often (in seconds) to poll for locks. .IP \fBDefault:\fR \f(CR5\fR .IP "\(bu" 3 \fB\f(CRbuild-users-group\fR\fR .IP This options specifies the Unix group containing the Nix build user accounts. In multi-user Nix installations, builds should not be performed by the Nix account since that would allow users to arbitrarily modify the Nix store and database by supplying specially crafted builders; and they cannot be performed by the calling user since that would allow him/her to influence the build result. .IP Therefore, if this option is non-empty and specifies a valid group, builds will be performed under the user accounts that are a member of the group specified here (as listed in \f(CR/etc/group\fR). Those user accounts should not be used for any other purpose! .IP Nix will never run two builds under the same user account at the same time. This is to prevent an obvious security hole: a malicious user writing a Nix expression that modifies the build result of a legitimate Nix expression being built by another user. Therefore it is good to have as many Nix build user accounts as you can spare. (Remember: uids are cheap.) .IP The build users should have permission to create files in the Nix store, but not delete them. Therefore, \f(CR/nix/store\fR should be owned by the Nix account, its group should be the group specified here, and its mode should be \f(CR1775\fR. .IP If the build users group is empty, builds will be performed under the uid of the Nix process (that is, the uid of the caller if \f(CRNIX_REMOTE\fR is empty, the uid under which the Nix daemon runs if \f(CRNIX_REMOTE\fR is \f(CRdaemon\fR). Obviously, this should not be used with a nix daemon accessible to untrusted clients. .IP Defaults to \f(CRnixbld\fR when running as root, \fIempty\fR otherwise. .IP \fBDefault:\fR \fImachine-specific\fR .IP "\(bu" 3 \fB\f(CRbuilders\fR\fR .IP A semicolon- or newline-separated list of build machines. .IP In addition to the \fBusual ways of setting configuration options\fR, the value can be read from a file by prefixing its absolute path with \f(CR@\fR. .RS .IP \fBExample\fR .IP This is the default setting: .LP .EX builders = @/etc/nix/machines .EE .RE .IP Each machine specification consists of the following elements, separated by spaces. Only the first element is required. To leave a field at its default, set it to \f(CR-\fR. .RS .IP "1." 3 The URI of the remote store in the format \f(CRssh://[username@]hostname\fR. .RS .IP \fBExample\fR .IP \f(CRssh://nix@mac\fR .RE .IP For backward compatibility, \f(CRssh://\fR may be omitted. The hostname may be an alias defined in \f(CR\(ti/.ssh/config\fR. .IP "2." 3 A comma-separated list of \fBNix system types\fR. If omitted, this defaults to the local platform type. .RS .IP \fBExample\fR .IP \f(CRaarch64-darwin\fR .RE .IP It is possible for a machine to support multiple platform types. .RS .IP \fBExample\fR .IP \f(CRi686-linux,x86_64-linux\fR .RE .IP "3." 3 The SSH identity file to be used to log in to the remote machine. If omitted, SSH will use its regular identities. .RS .IP \fBExample\fR .IP \f(CR/home/user/.ssh/id_mac\fR .RE .IP "4." 3 The maximum number of builds that Nix will execute in parallel on the machine. Typically this should be equal to the number of CPU cores. .IP "5." 3 The “speed factor”, indicating the relative speed of the machine as a positive integer. If there are multiple machines of the right type, Nix will prefer the fastest, taking load into account. .IP "6." 3 A comma-separated list of supported \fBsystem features\fR. .IP A machine will only be used to build a derivation if all the features in the derivation\(cqs \fB\f(CRrequiredSystemFeatures\fR\fR attribute are supported by that machine. .IP "7." 3 A comma-separated list of required \fBsystem features\fR. .IP A machine will only be used to build a derivation if all of the machine’s required features appear in the derivation’s \fB\f(CRrequiredSystemFeatures\fR\fR attribute. .IP "8." 3 The (base64-encoded) public host key of the remote machine. If omitted, SSH will use its regular \f(CRknown_hosts\fR file. .IP The value for this field can be obtained via \f(CRbase64 -w0\fR. .RE .RS .IP \fBExample\fR .IP Multiple builders specified on the command line: .LP .EX --builders 'ssh://mac x86_64-darwin ; ssh://beastie x86_64-freebsd' .EE .IP \fBExample\fR .IP This specifies several machines that can perform \f(CRi686-linux\fR builds: .LP .EX nix@scratchy.labs.cs.uu.nl i686-linux /home/nix/.ssh/id_scratchy 8 1 kvm nix@itchy.labs.cs.uu.nl i686-linux /home/nix/.ssh/id_scratchy 8 2 nix@poochie.labs.cs.uu.nl i686-linux /home/nix/.ssh/id_scratchy 1 2 kvm benchmark .EE .IP However, \f(CRpoochie\fR will only build derivations that have the attribute .LP .EX requiredSystemFeatures = [ \(dqbenchmark\(dq ]; .EE .IP or .LP .EX requiredSystemFeatures = [ \(dqbenchmark\(dq \(dqkvm\(dq ]; .EE .IP \f(CRitchy\fR cannot do builds that require \f(CRkvm\fR, but \f(CRscratchy\fR does support such builds. For regular builds, \f(CRitchy\fR will be preferred over \f(CRscratchy\fR because it has a higher speed factor. .RE .IP For Nix to use substituters, the calling user must be in the \fB\f(CRtrusted-users\fR\fR list. .RS .IP \fBNote\fR .IP A build machine must be accessible via SSH and have Nix installed. \f(CRnix\fR must be available in \f(CR$PATH\fR for the user connecting over SSH. .IP \fBWarning\fR .IP If you are building via the Nix daemon (default), the Nix daemon user account on the local machine (that is, \f(CRroot\fR) requires access to a user account on the remote machine (not necessarily \f(CRroot\fR). .IP If you can’t or don’t want to configure \f(CRroot\fR to be able to access the remote machine, set \fB\f(CRstore\fR\fR to any \fBlocal store\fR, e.g. by passing \f(CR--store /tmp\fR to the command on the local machine. .RE .IP To build only on remote machines and disable local builds, set \fB\f(CRmax-jobs\fR\fR to 0. .IP If you want the remote machines to use substituters, set \fB\f(CRbuilders-use-substitutes\fR\fR to \f(CRtrue\fR. .IP \fBDefault:\fR \fImachine-specific\fR .IP "\(bu" 3 \fB\f(CRbuilders-use-substitutes\fR\fR .IP If set to \f(CRtrue\fR, Nix will instruct \fBremote build machines\fR to use their own \fB\f(CRsubstituters\fR\fR if available. .IP It means that remote build hosts will fetch as many dependencies as possible from their own substituters (e.g, from \f(CRcache.nixos.org\fR) instead of waiting for the local machine to upload them all. This can drastically reduce build times if the network connection between the local machine and the remote build host is slow. .IP \fBDefault:\fR \f(CRfalse\fR .IP "\(bu" 3 \fB\f(CRcommit-lock-file-summary\fR\fR .RS .IP \fBWarning\fR .IP This setting is part of an \fBexperimental feature\fR. .IP To change this setting, make sure the \fB\f(CRflakes\fR experimental feature\fR is enabled. For example, include the following in \fB\f(CRnix.conf\fR\fR: .LP .EX extra-experimental-features = flakes commit-lock-file-summary = ... .EE .RE .IP The commit summary to use when committing changed flake lock files. If empty, the summary is generated based on the action performed. .IP \fBDefault:\fR \fIempty\fR .IP \fBDeprecated alias:\fR \f(CRcommit-lockfile-summary\fR .IP "\(bu" 3 \fB\f(CRcompress-build-log\fR\fR .IP If set to \f(CRtrue\fR (the default), build logs written to \f(CR/nix/var/log/nix/drvs\fR will be compressed on the fly using bzip2. Otherwise, they will not be compressed. .IP \fBDefault:\fR \f(CRtrue\fR .IP \fBDeprecated alias:\fR \f(CRbuild-compress-log\fR .IP "\(bu" 3 \fB\f(CRconnect-timeout\fR\fR .IP The timeout (in seconds) for establishing connections in the binary cache substituter. It corresponds to \f(CRcurl\fR’s \f(CR--connect-timeout\fR option. A value of 0 means no limit. .IP \fBDefault:\fR \f(CR0\fR .IP "\(bu" 3 \fB\f(CRcores\fR\fR .IP Sets the value of the \f(CRNIX_BUILD_CORES\fR environment variable in the \fBinvocation of the \f(CRbuilder\fR executable\fR of a derivation. The \f(CRbuilder\fR executable can use this variable to control its own maximum amount of parallelism. .IP For instance, in Nixpkgs, if the attribute \f(CRenableParallelBuilding\fR for the \f(CRmkDerivation\fR build helper is set to \f(CRtrue\fR, it will pass the \f(CR-j${NIX_BUILD_CORES}\fR flag to GNU Make. .IP The value \f(CR0\fR means that the \f(CRbuilder\fR should use all available CPU cores in the system. .RS .IP \fBNote\fR .IP The number of parallel local Nix build jobs is independently controlled with the \fB\f(CRmax-jobs\fR\fR setting. .RE .IP \fBDefault:\fR \fImachine-specific\fR .IP \fBDeprecated alias:\fR \f(CRbuild-cores\fR .IP "\(bu" 3 \fB\f(CRdebugger-on-trace\fR\fR .IP If set to true and the \f(CR--debugger\fR flag is given, the following functions will enter the debugger like \fB\f(CRbuiltins.break\fR\fR. .RS .IP "\(bu" 3 \fB\f(CRbuiltins.trace\fR\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \fB\f(CRbuiltins.traceVerbose\fR\fR if \fB\f(CRtrace-verbose\fR\fR is set to true. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \fB\f(CRbuiltins.warn\fR\fR .RE .IP This is useful for debugging warnings in third-party Nix code. .IP \fBDefault:\fR \f(CRfalse\fR .IP "\(bu" 3 \fB\f(CRdebugger-on-warn\fR\fR .IP If set to true and the \f(CR--debugger\fR flag is given, \fB\f(CRbuiltins.warn\fR\fR will enter the debugger like \fB\f(CRbuiltins.break\fR\fR. .IP This is useful for debugging warnings in third-party Nix code. .IP Use \fB\f(CRdebugger-on-trace\fR\fR to also enter the debugger on legacy warnings that are logged with \fB\f(CRbuiltins.trace\fR\fR. .IP \fBDefault:\fR \f(CRfalse\fR .IP "\(bu" 3 \fB\f(CRdiff-hook\fR\fR .IP Absolute path to an executable capable of diffing build results. The hook is executed if \f(CRrun-diff-hook\fR is true, and the output of a build is known to not be the same. This program is not executed to determine if two results are the same. .IP The diff hook is executed by the same user and group who ran the build. However, the diff hook does not have write access to the store path just built. .IP The diff hook program receives three parameters: .RS .IP "1." 3 A path to the previous build\(cqs results .IP "2." 3 A path to the current build\(cqs results .IP "3." 3 The path to the build\(cqs derivation .IP "4." 3 The path to the build\(cqs scratch directory. This directory will exist only if the build was run with \f(CR--keep-failed\fR. .RE .IP The stderr and stdout output from the diff hook will not be displayed to the user. Instead, it will print to the nix-daemon\(cqs log. .IP When using the Nix daemon, \f(CRdiff-hook\fR must be set in the \f(CRnix.conf\fR configuration file, and cannot be passed at the command line. .IP \fBDefault:\fR \(ga\(ga .IP "\(bu" 3 \fB\f(CRdownload-attempts\fR\fR .IP How often Nix will attempt to download a file before giving up. .IP \fBDefault:\fR \f(CR5\fR .IP "\(bu" 3 \fB\f(CRdownload-buffer-size\fR\fR .IP The size of Nix\(cqs internal download buffer during \f(CRcurl\fR transfers. If data is not processed quickly enough to exceed the size of this buffer, downloads may stall. .IP \fBDefault:\fR \f(CR67108864\fR .IP "\(bu" 3 \fB\f(CRdownload-speed\fR\fR .IP Specify the maximum transfer rate in kilobytes per second you want Nix to use for downloads. .IP \fBDefault:\fR \f(CR0\fR .IP "\(bu" 3 \fB\f(CReval-cache\fR\fR .IP Whether to use the flake evaluation cache. .IP \fBDefault:\fR \f(CRtrue\fR .IP "\(bu" 3 \fB\f(CReval-system\fR\fR .IP This option defines \fB\f(CRbuiltins.currentSystem\fR\fR in the Nix language if it is set as a non-empty string. Otherwise, if it is defined as the empty string (the default), the value of the \fB\f(CRsystem\fR \fR configuration setting is used instead. .IP Unlike \f(CRsystem\fR, this setting does not change what kind of derivations can be built locally. This is useful for evaluating Nix code on one system to produce derivations to be built on another type of system. .IP \fBDefault:\fR \fIempty\fR .IP "\(bu" 3 \fB\f(CRexperimental-features\fR\fR .IP Experimental features that are enabled. .IP Example: .LP .EX experimental-features = nix-command flakes .EE .IP The following experimental features are available: .RS .IP "\(bu" 3 \fB\f(CRauto-allocate-uids\fR\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \fB\f(CRca-derivations\fR\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \fB\f(CRcgroups\fR\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \fB\f(CRconfigurable-impure-env\fR\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \fB\f(CRdaemon-trust-override\fR\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \fB\f(CRdynamic-derivations\fR\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \fB\f(CRfetch-closure\fR\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \fB\f(CRfetch-tree\fR\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \fB\f(CRflakes\fR\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \fB\f(CRgit-hashing\fR\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \fB\f(CRimpure-derivations\fR\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \fB\f(CRlocal-overlay-store\fR\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \fB\f(CRmounted-ssh-store\fR\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \fB\f(CRnix-command\fR\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \fB\f(CRno-url-literals\fR\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \fB\f(CRparse-toml-timestamps\fR\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \fB\f(CRpipe-operators\fR\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \fB\f(CRread-only-local-store\fR\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \fB\f(CRrecursive-nix\fR\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \fB\f(CRverified-fetches\fR\fR .RE .IP Experimental features are \fBfurther documented in the manual\fR. .IP \fBDefault:\fR \fIempty\fR .IP "\(bu" 3 \fB\f(CRextra-platforms\fR\fR .IP System types of executables that can be run on this machine. .IP Nix will only build a given \fBderivation\fR locally when its \f(CRsystem\fR attribute equals any of the values specified here or in the \fB\f(CRsystem\fR option\fR. .IP Setting this can be useful to build derivations locally on compatible machines: .RS .IP "\(bu" 3 \f(CRi686-linux\fR executables can be run on \f(CRx86_64-linux\fR machines (set by default) .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \f(CRx86_64-darwin\fR executables can be run on macOS \f(CRaarch64-darwin\fR with Rosetta 2 (set by default where applicable) .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \f(CRarmv6\fR and \f(CRarmv5tel\fR executables can be run on \f(CRarmv7\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 some \f(CRaarch64\fR machines can also natively run 32-bit ARM code .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \f(CRqemu-user\fR may be used to support non-native platforms (though this may be slow and buggy) .RE .IP Build systems will usually detect the target platform to be the current physical system and therefore produce machine code incompatible with what may be intended in the derivation. You should design your derivation\(cqs \f(CRbuilder\fR accordingly and cross-check the results when using this option against natively-built versions of your derivation. .IP \fBDefault:\fR \fImachine-specific\fR .IP "\(bu" 3 \fB\f(CRfallback\fR\fR .IP If set to \f(CRtrue\fR, Nix will fall back to building from source if a binary substitute fails. This is equivalent to the \f(CR--fallback\fR flag. The default is \f(CRfalse\fR. .IP \fBDefault:\fR \f(CRfalse\fR .IP \fBDeprecated alias:\fR \f(CRbuild-fallback\fR .IP "\(bu" 3 \fB\f(CRfilter-syscalls\fR\fR .IP Whether to prevent certain dangerous system calls, such as creation of setuid/setgid files or adding ACLs or extended attributes. Only disable this if you\(cqre aware of the security implications. .IP \fBDefault:\fR \f(CRtrue\fR .IP "\(bu" 3 \fB\f(CRflake-registry\fR\fR .RS .IP \fBWarning\fR .IP This setting is part of an \fBexperimental feature\fR. .IP To change this setting, make sure the \fB\f(CRflakes\fR experimental feature\fR is enabled. For example, include the following in \fB\f(CRnix.conf\fR\fR: .LP .EX extra-experimental-features = flakes flake-registry = ... .EE .RE .IP Path or URI of the global flake registry. .IP When empty, disables the global flake registry. .IP \fBDefault:\fR \f(CRhttps://channels.nixos.org/flake-registry.json\fR .IP "\(bu" 3 \fB\f(CRfsync-metadata\fR\fR .IP If set to \f(CRtrue\fR, changes to the Nix store metadata (in \f(CR/nix/var/nix/db\fR) are synchronously flushed to disk. This improves robustness in case of system crashes, but reduces performance. The default is \f(CRtrue\fR. .IP \fBDefault:\fR \f(CRtrue\fR .IP "\(bu" 3 \fB\f(CRgc-reserved-space\fR\fR .IP Amount of reserved disk space for the garbage collector. .IP \fBDefault:\fR \f(CR8388608\fR .IP "\(bu" 3 \fB\f(CRhashed-mirrors\fR\fR .IP A list of web servers used by \f(CRbuiltins.fetchurl\fR to obtain files by hash. Given a hash algorithm \fIha\fR and a base-16 hash \fIh\fR, Nix will try to download the file from \fIhashed-mirror\fR/\fIha\fR/\fIh\fR. This allows files to be downloaded even if they have disappeared from their original URI. For example, given an example mirror \f(CRhttp://tarballs.nixos.org/\fR, when building the derivation .LP .EX builtins.fetchurl { url = \(dqhttps://example.org/foo-1.2.3.tar.xz\(dq; sha256 = \(dq2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae\(dq; } .EE .IP Nix will attempt to download this file from \f(CRhttp://tarballs.nixos.org/sha256/2c26b46b68ffc68ff99b453c1d30413413422d706483bfa0f98a5e886266e7ae\fR first. If it is not available there, if will try the original URI. .IP \fBDefault:\fR \fIempty\fR .IP "\(bu" 3 \fB\f(CRhttp-connections\fR\fR .IP The maximum number of parallel TCP connections used to fetch files from binary caches and by other downloads. It defaults to 25. 0 means no limit. .IP \fBDefault:\fR \f(CR25\fR .IP \fBDeprecated alias:\fR \f(CRbinary-caches-parallel-connections\fR .IP "\(bu" 3 \fB\f(CRhttp2\fR\fR .IP Whether to enable HTTP/2 support. .IP \fBDefault:\fR \f(CRtrue\fR .IP "\(bu" 3 \fB\f(CRid-count\fR\fR .IP The number of UIDs/GIDs to use for dynamic ID allocation. .IP \fBDefault:\fR \f(CR8388608\fR .IP "\(bu" 3 \fB\f(CRignore-try\fR\fR .IP If set to true, ignore exceptions inside \(oqtryEval\(cq calls when evaluating nix expressions in debug mode (using the \(endebugger flag). By default the debugger will pause on all exceptions. .IP \fBDefault:\fR \f(CRfalse\fR .IP "\(bu" 3 \fB\f(CRignored-acls\fR\fR .IP A list of ACLs that should be ignored, normally Nix attempts to remove all ACLs from files and directories in the Nix store, but some ACLs like \f(CRsecurity.selinux\fR or \f(CRsystem.nfs4_acl\fR can\(cqt be removed even by root. Therefore it\(cqs best to just ignore them. .IP \fBDefault:\fR \f(CRsecurity.csm security.selinux system.nfs4_acl\fR .IP "\(bu" 3 \fB\f(CRimpersonate-linux-26\fR\fR .IP Whether to impersonate a Linux 2.6 machine on newer kernels. .IP \fBDefault:\fR \f(CRfalse\fR .IP \fBDeprecated alias:\fR \f(CRbuild-impersonate-linux-26\fR .IP "\(bu" 3 \fB\f(CRimpure-env\fR\fR .RS .IP \fBWarning\fR .IP This setting is part of an \fBexperimental feature\fR. .IP To change this setting, make sure the \fB\f(CRconfigurable-impure-env\fR experimental feature\fR is enabled. For example, include the following in \fB\f(CRnix.conf\fR\fR: .LP .EX extra-experimental-features = configurable-impure-env impure-env = ... .EE .RE .IP A list of items, each in the format of: .RS .IP "\(bu" 3 \f(CRname=value\fR: Set environment variable \f(CRname\fR to \f(CRvalue\fR. .RE .IP If the user is trusted (see \f(CRtrusted-users\fR option), when building a fixed-output derivation, environment variables set in this option will be passed to the builder if they are listed in \fB\f(CRimpureEnvVars\fR\fR. .IP This option is useful for, e.g., setting \f(CRhttps_proxy\fR for fixed-output derivations and in a multi-user Nix installation, or setting private access tokens when fetching a private repository. .IP \fBDefault:\fR \fIempty\fR .IP "\(bu" 3 \fB\f(CRkeep-build-log\fR\fR .IP If set to \f(CRtrue\fR (the default), Nix will write the build log of a derivation (i.e. the standard output and error of its builder) to the directory \f(CR/nix/var/log/nix/drvs\fR. The build log can be retrieved using the command \f(CRnix-store -l path\fR. .IP \fBDefault:\fR \f(CRtrue\fR .IP \fBDeprecated alias:\fR \f(CRbuild-keep-log\fR .IP "\(bu" 3 \fB\f(CRkeep-derivations\fR\fR .IP If \f(CRtrue\fR (default), the garbage collector will keep the derivations from which non-garbage store paths were built. If \f(CRfalse\fR, they will be deleted unless explicitly registered as a root (or reachable from other roots). .IP Keeping derivation around is useful for querying and traceability (e.g., it allows you to ask with what dependencies or options a store path was built), so by default this option is on. Turn it off to save a bit of disk space (or a lot if \f(CRkeep-outputs\fR is also turned on). .IP \fBDefault:\fR \f(CRtrue\fR .IP \fBDeprecated alias:\fR \f(CRgc-keep-derivations\fR .IP "\(bu" 3 \fB\f(CRkeep-env-derivations\fR\fR .IP If \f(CRfalse\fR (default), derivations are not stored in Nix user environments. That is, the derivations of any build-time-only dependencies may be garbage-collected. .IP If \f(CRtrue\fR, when you add a Nix derivation to a user environment, the path of the derivation is stored in the user environment. Thus, the derivation will not be garbage-collected until the user environment generation is deleted (\f(CRnix-env --delete-generations\fR). To prevent build-time-only dependencies from being collected, you should also turn on \f(CRkeep-outputs\fR. .IP The difference between this option and \f(CRkeep-derivations\fR is that this one is “sticky”: it applies to any user environment created while this option was enabled, while \f(CRkeep-derivations\fR only applies at the moment the garbage collector is run. .IP \fBDefault:\fR \f(CRfalse\fR .IP \fBDeprecated alias:\fR \f(CRenv-keep-derivations\fR .IP "\(bu" 3 \fB\f(CRkeep-failed\fR\fR .IP Whether to keep temporary directories of failed builds. .IP \fBDefault:\fR \f(CRfalse\fR .IP "\(bu" 3 \fB\f(CRkeep-going\fR\fR .IP Whether to keep building derivations when another build fails. .IP \fBDefault:\fR \f(CRfalse\fR .IP "\(bu" 3 \fB\f(CRkeep-outputs\fR\fR .IP If \f(CRtrue\fR, the garbage collector will keep the outputs of non-garbage derivations. If \f(CRfalse\fR (default), outputs will be deleted unless they are GC roots themselves (or reachable from other roots). .IP In general, outputs must be registered as roots separately. However, even if the output of a derivation is registered as a root, the collector will still delete store paths that are used only at build time (e.g., the C compiler, or source tarballs downloaded from the network). To prevent it from doing so, set this option to \f(CRtrue\fR. .IP \fBDefault:\fR \f(CRfalse\fR .IP \fBDeprecated alias:\fR \f(CRgc-keep-outputs\fR .IP "\(bu" 3 \fB\f(CRlog-lines\fR\fR .IP The number of lines of the tail of the log to show if a build fails. .IP \fBDefault:\fR \f(CR25\fR .IP "\(bu" 3 \fB\f(CRmax-build-log-size\fR\fR .IP This option defines the maximum number of bytes that a builder can write to its stdout/stderr. If the builder exceeds this limit, it’s killed. A value of \f(CR0\fR (the default) means that there is no limit. .IP \fBDefault:\fR \f(CR0\fR .IP \fBDeprecated alias:\fR \f(CRbuild-max-log-size\fR .IP "\(bu" 3 \fB\f(CRmax-call-depth\fR\fR .IP The maximum function call depth to allow before erroring. .IP \fBDefault:\fR \f(CR10000\fR .IP "\(bu" 3 \fB\f(CRmax-free\fR\fR .IP When a garbage collection is triggered by the \f(CRmin-free\fR option, it stops as soon as \f(CRmax-free\fR bytes are available. The default is infinity (i.e. delete all garbage). .IP \fBDefault:\fR \f(CR-1\fR .IP "\(bu" 3 \fB\f(CRmax-jobs\fR\fR .IP Maximum number of jobs that Nix will try to build locally in parallel. .IP The special value \f(CRauto\fR causes Nix to use the number of CPUs in your system. Use \f(CR0\fR to disable local builds and directly use the remote machines specified in \fB\f(CRbuilders\fR\fR. This will not affect derivations that have \fB\f(CRpreferLocalBuild = true\fR\fR, which are always built locally. .RS .IP \fBNote\fR .IP The number of CPU cores to use for each build job is independently determined by the \fB\f(CRcores\fR\fR setting. .RE .IP The setting can be overridden using the \f(CR--max-jobs\fR (\f(CR-j\fR) command line switch. .IP \fBDefault:\fR \f(CR1\fR .IP \fBDeprecated alias:\fR \f(CRbuild-max-jobs\fR .IP "\(bu" 3 \fB\f(CRmax-silent-time\fR\fR .IP This option defines the maximum number of seconds that a builder can go without producing any data on standard output or standard error. This is useful (for instance in an automated build system) to catch builds that are stuck in an infinite loop, or to catch remote builds that are hanging due to network problems. It can be overridden using the \f(CR--max-silent-time\fR command line switch. .IP The value \f(CR0\fR means that there is no timeout. This is also the default. .IP \fBDefault:\fR \f(CR0\fR .IP \fBDeprecated alias:\fR \f(CRbuild-max-silent-time\fR .IP "\(bu" 3 \fB\f(CRmax-substitution-jobs\fR\fR .IP This option defines the maximum number of substitution jobs that Nix will try to run in parallel. The default is \f(CR16\fR. The minimum value one can choose is \f(CR1\fR and lower values will be interpreted as \f(CR1\fR. .IP \fBDefault:\fR \f(CR16\fR .IP \fBDeprecated alias:\fR \f(CRsubstitution-max-jobs\fR .IP "\(bu" 3 \fB\f(CRmin-free\fR\fR .IP When free disk space in \f(CR/nix/store\fR drops below \f(CRmin-free\fR during a build, Nix performs a garbage-collection until \f(CRmax-free\fR bytes are available or there is no more garbage. A value of \f(CR0\fR (the default) disables this feature. .IP \fBDefault:\fR \f(CR0\fR .IP "\(bu" 3 \fB\f(CRmin-free-check-interval\fR\fR .IP Number of seconds between checking free disk space. .IP \fBDefault:\fR \f(CR5\fR .IP "\(bu" 3 \fB\f(CRnar-buffer-size\fR\fR .IP Maximum size of NARs before spilling them to disk. .IP \fBDefault:\fR \f(CR33554432\fR .IP "\(bu" 3 \fB\f(CRnarinfo-cache-negative-ttl\fR\fR .IP The TTL in seconds for negative lookups. If a store path is queried from a \fBsubstituter\fR but was not found, there will be a negative lookup cached in the local disk cache database for the specified duration. .IP Set to \f(CR0\fR to force updating the lookup cache. .IP To wipe the lookup cache completely: .LP .EX $ rm $HOME/.cache/nix/binary-cache-v*.sqlite* # rm /root/.cache/nix/binary-cache-v*.sqlite* .EE .IP \fBDefault:\fR \f(CR3600\fR .IP "\(bu" 3 \fB\f(CRnarinfo-cache-positive-ttl\fR\fR .IP The TTL in seconds for positive lookups. If a store path is queried from a substituter, the result of the query will be cached in the local disk cache database including some of the NAR metadata. The default TTL is a month, setting a shorter TTL for positive lookups can be useful for binary caches that have frequent garbage collection, in which case having a more frequent cache invalidation would prevent trying to pull the path again and failing with a hash mismatch if the build isn\(cqt reproducible. .IP \fBDefault:\fR \f(CR2592000\fR .IP "\(bu" 3 \fB\f(CRnetrc-file\fR\fR .IP If set to an absolute path to a \f(CRnetrc\fR file, Nix will use the HTTP authentication credentials in this file when trying to download from a remote host through HTTP or HTTPS. Defaults to \f(CR$NIX_CONF_DIR/netrc\fR. .IP The \f(CRnetrc\fR file consists of a list of accounts in the following format: .IP machine my-machine login my-username password my-password .IP For the exact syntax, see \fBthe \f(CRcurl\fR documentation\fR. .RS .IP \fBNote\fR .IP This must be an absolute path, and \f(CR\(ti\fR is not resolved. For example, \f(CR\(ti/.netrc\fR won\(cqt resolve to your home directory\(cqs \f(CR.netrc\fR. .RE .IP \fBDefault:\fR \f(CR/dummy/netrc\fR .IP "\(bu" 3 \fB\f(CRnix-path\fR\fR .IP List of search paths to use for \fBlookup path\fR resolution. This setting determines the value of \fB\f(CRbuiltins.nixPath\fR\fR and can be used with \fB\f(CRbuiltins.findFile\fR\fR. .RS .IP "\(bu" 3 The configuration setting is overridden by the \fB\f(CRNIX_PATH\fR\fR environment variable. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \f(CRNIX_PATH\fR is overridden by \fBspecifying the setting as the command line flag\fR \f(CR--nix-path\fR. .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 Any current value is extended by the \fB\f(CR-I\fR option\fR or \f(CR--extra-nix-path\fR. .RE .IP If the respective paths are accessible, the default values are: .RS .IP "\(bu" 3 \f(CR$HOME/.nix-defexpr/channels\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \f(CRnixpkgs=$NIX_STATE_DIR/profiles/per-user/root/channels/nixpkgs\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \f(CR$NIX_STATE_DIR/profiles/per-user/root/channels\fR .RE .IP See \fB\f(CRNIX_STATE_DIR\fR\fR for details. .RS .IP \fBNote\fR .IP If \fBrestricted evaluation\fR is enabled, the default value is empty. .IP If \fBpure evaluation\fR is enabled, \f(CRbuiltins.nixPath\fR \fIalways\fR evaluates to the empty list \f(CR[ ]\fR. .RE .IP \fBDefault:\fR \fImachine-specific\fR .IP "\(bu" 3 \fB\f(CRnix-shell-always-looks-for-shell-nix\fR\fR .IP Before Nix 2.24, \fB\f(CRnix-shell\fR\fR would only look at \f(CRshell.nix\fR if it was in the working directory - when no file was specified. .IP Since Nix 2.24, \f(CRnix-shell\fR always looks for a \f(CRshell.nix\fR, whether that\(cqs in the working directory, or in a directory that was passed as an argument. .IP You may set this to \f(CRfalse\fR to temporarily revert to the behavior of Nix 2.23 and older. .IP Using this setting is not recommended. It will be deprecated and removed. .IP \fBDefault:\fR \f(CRtrue\fR .IP "\(bu" 3 \fB\f(CRnix-shell-shebang-arguments-relative-to-script\fR\fR .IP Before Nix 2.24, relative file path expressions in arguments in a \f(CRnix-shell\fR shebang were resolved relative to the working directory. .IP Since Nix 2.24, \f(CRnix-shell\fR resolves these paths in a manner that is relative to the \fBbase directory\fR, defined as the script\(cqs directory. .IP You may set this to \f(CRfalse\fR to temporarily revert to the behavior of Nix 2.23 and older. .IP Using this setting is not recommended. It will be deprecated and removed. .IP \fBDefault:\fR \f(CRtrue\fR .IP "\(bu" 3 \fB\f(CRplugin-files\fR\fR .IP A list of plugin files to be loaded by Nix. Each of these files will be dlopened by Nix. If they contain the symbol \f(CRnix_plugin_entry()\fR, this symbol will be called. Alternatively, they can affect execution through static initialization. In particular, these plugins may construct static instances of RegisterPrimOp to add new primops or constants to the expression language, RegisterStoreImplementation to add new store implementations, RegisterCommand to add new subcommands to the \f(CRnix\fR command, and RegisterSetting to add new nix config settings. See the constructors for those types for more details. .IP Warning! These APIs are inherently unstable and may change from release to release. .IP Since these files are loaded into the same address space as Nix itself, they must be DSOs compatible with the instance of Nix running at the time (i.e. compiled against the same headers, not linked to any incompatible libraries). They should not be linked to any Nix libs directly, as those will be available already at load time. .IP If an entry in the list is a directory, all files in the directory are loaded as plugins (non-recursively). .IP \fBDefault:\fR \fIempty\fR .IP "\(bu" 3 \fB\f(CRpost-build-hook\fR\fR .IP Optional. The path to a program to execute after each build. .IP This option is only settable in the global \f(CRnix.conf\fR, or on the command line by trusted users. .IP When using the nix-daemon, the daemon executes the hook as \f(CRroot\fR. If the nix-daemon is not involved, the hook runs as the user executing the nix-build. .RS .IP "\(bu" 3 The hook executes after an evaluation-time build. .IP "\(bu" 3 The hook does not execute on substituted paths. .IP "\(bu" 3 The hook\(cqs output always goes to the user\(cqs terminal. .IP "\(bu" 3 If the hook fails, the build succeeds but no further builds execute. .IP "\(bu" 3 The hook executes synchronously, and blocks other builds from progressing while it runs. .RE .IP The program executes with no arguments. The program\(cqs environment contains the following environment variables: .RS .IP "\(bu" 3 \f(CRDRV_PATH\fR The derivation for the built paths. .IP Example: \f(CR/nix/store/5nihn1a7pa8b25l9zafqaqibznlvvp3f-bash-4.4-p23.drv\fR .IP "\(bu" 3 \f(CROUT_PATHS\fR Output paths of the built derivation, separated by a space character. .IP Example: \f(CR/nix/store/zf5lbh336mnzf1nlswdn11g4n2m8zh3g-bash-4.4-p23-dev /nix/store/rjxwxwv1fpn9wa2x5ssk5phzwlcv4mna-bash-4.4-p23-doc /nix/store/6bqvbzjkcp9695dq0dpl5y43nvy37pq1-bash-4.4-p23-info /nix/store/r7fng3kk3vlpdlh2idnrbn37vh4imlj2-bash-4.4-p23-man /nix/store/xfghy8ixrhz3kyy6p724iv3cxji088dx-bash-4.4-p23\fR. .RE .IP \fBDefault:\fR \fIempty\fR .IP "\(bu" 3 \fB\f(CRpre-build-hook\fR\fR .IP If set, the path to a program that can set extra derivation-specific settings for this system. This is used for settings that can\(cqt be captured by the derivation model itself and are too variable between different versions of the same system to be hard-coded into nix. .IP The hook is passed the derivation path and, if sandboxes are enabled, the sandbox directory. It can then modify the sandbox and send a series of commands to modify various settings to stdout. The currently recognized commands are: .RS .IP "\(bu" 3 \f(CRextra-sandbox-paths\fR .br Pass a list of files and directories to be included in the sandbox for this build. One entry per line, terminated by an empty line. Entries have the same format as \f(CRsandbox-paths\fR. .RE .IP \fBDefault:\fR \fIempty\fR .IP "\(bu" 3 \fB\f(CRpreallocate-contents\fR\fR .IP Whether to preallocate files when writing objects with known size. .IP \fBDefault:\fR \f(CRfalse\fR .IP "\(bu" 3 \fB\f(CRprint-missing\fR\fR .IP Whether to print what paths need to be built or downloaded. .IP \fBDefault:\fR \f(CRtrue\fR .IP "\(bu" 3 \fB\f(CRpure-eval\fR\fR .IP Pure evaluation mode ensures that the result of Nix expressions is fully determined by explicitly declared inputs, and not influenced by external state: .RS .IP "\(bu" 3 Restrict file system and network access to files specified by cryptographic hash .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 Disable impure constants: .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \fB\f(CRbuiltins.currentSystem\fR\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \fB\f(CRbuiltins.currentTime\fR\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \fB\f(CRbuiltins.nixPath\fR\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \fB\f(CRbuiltins.storePath\fR\fR .RE .IP \fBDefault:\fR \f(CRfalse\fR .IP "\(bu" 3 \fB\f(CRrequire-drop-supplementary-groups\fR\fR .IP Following the principle of least privilege, Nix will attempt to drop supplementary groups when building with sandboxing. .IP However this can fail under some circumstances. For example, if the user lacks the \f(CRCAP_SETGID\fR capability. Search \f(CRsetgroups(2)\fR for \f(CREPERM\fR to find more detailed information on this. .IP If you encounter such a failure, setting this option to \f(CRfalse\fR will let you ignore it and continue. But before doing so, you should consider the security implications carefully. Not dropping supplementary groups means the build sandbox will be less restricted than intended. .IP This option defaults to \f(CRtrue\fR when the user is root (since \f(CRroot\fR usually has permissions to call setgroups) and \f(CRfalse\fR otherwise. .IP \fBDefault:\fR \f(CRfalse\fR .IP "\(bu" 3 \fB\f(CRrequire-sigs\fR\fR .IP If set to \f(CRtrue\fR (the default), any non-content-addressed path added or copied to the Nix store (e.g. when substituting from a binary cache) must have a signature by a trusted key. A trusted key is one listed in \f(CRtrusted-public-keys\fR, or a public key counterpart to a private key stored in a file listed in \f(CRsecret-key-files\fR. .IP Set to \f(CRfalse\fR to disable signature checking and trust all non-content-addressed paths unconditionally. .IP (Content-addressed paths are inherently trustworthy and thus unaffected by this configuration option.) .IP \fBDefault:\fR \f(CRtrue\fR .IP "\(bu" 3 \fB\f(CRrestrict-eval\fR\fR .IP If set to \f(CRtrue\fR, the Nix evaluator will not allow access to any files outside of \fB\f(CRbuiltins.nixPath\fR\fR, or to URIs outside of \fB\f(CRallowed-uris\fR\fR. .IP \fBDefault:\fR \f(CRfalse\fR .IP "\(bu" 3 \fB\f(CRrun-diff-hook\fR\fR .IP If true, enable the execution of the \f(CRdiff-hook\fR program. .IP When using the Nix daemon, \f(CRrun-diff-hook\fR must be set in the \f(CRnix.conf\fR configuration file, and cannot be passed at the command line. .IP \fBDefault:\fR \f(CRfalse\fR .IP "\(bu" 3 \fB\f(CRsandbox\fR\fR .IP If set to \f(CRtrue\fR, builds will be performed in a \fIsandboxed environment\fR, i.e., they’re isolated from the normal file system hierarchy and will only see their dependencies in the Nix store, the temporary build directory, private versions of \f(CR/proc\fR, \f(CR/dev\fR, \f(CR/dev/shm\fR and \f(CR/dev/pts\fR (on Linux), and the paths configured with the \f(CRsandbox-paths\fR option. This is useful to prevent undeclared dependencies on files in directories such as \f(CR/usr/bin\fR. In addition, on Linux, builds run in private PID, mount, network, IPC and UTS namespaces to isolate them from other processes in the system (except that fixed-output derivations do not run in private network namespace to ensure they can access the network). .IP Currently, sandboxing only work on Linux and macOS. The use of a sandbox requires that Nix is run as root (so you should use the “build users” feature to perform the actual builds under different users than root). .IP If this option is set to \f(CRrelaxed\fR, then fixed-output derivations and derivations that have the \f(CR__noChroot\fR attribute set to \f(CRtrue\fR do not run in sandboxes. .IP The default is \f(CRtrue\fR on Linux and \f(CRfalse\fR on all other platforms. .IP \fBDefault:\fR \f(CRtrue\fR .IP \fBDeprecated alias:\fR \f(CRbuild-use-chroot\fR, \f(CRbuild-use-sandbox\fR .IP "\(bu" 3 \fB\f(CRsandbox-build-dir\fR\fR .IP \fILinux only\fR .IP The build directory inside the sandbox. .IP This directory is backed by \fB\f(CRbuild-dir\fR\fR on the host. .IP \fBDefault:\fR \f(CR/build\fR .IP "\(bu" 3 \fB\f(CRsandbox-dev-shm-size\fR\fR .IP \fILinux only\fR .IP This option determines the maximum size of the \f(CRtmpfs\fR filesystem mounted on \f(CR/dev/shm\fR in Linux sandboxes. For the format, see the description of the \f(CRsize\fR option of \f(CRtmpfs\fR in mount(8). The default is \f(CR50%\fR. .IP \fBDefault:\fR \f(CR50%\fR .IP "\(bu" 3 \fB\f(CRsandbox-fallback\fR\fR .IP Whether to disable sandboxing when the kernel doesn\(cqt allow it. .IP \fBDefault:\fR \f(CRtrue\fR .IP "\(bu" 3 \fB\f(CRsandbox-paths\fR\fR .IP A list of paths bind-mounted into Nix sandbox environments. You can use the syntax \f(CRtarget=source\fR to mount a path in a different location in the sandbox; for instance, \f(CR/bin=/nix-bin\fR will mount the path \f(CR/nix-bin\fR as \f(CR/bin\fR inside the sandbox. If \fIsource\fR is followed by \f(CR?\fR, then it is not an error if \fIsource\fR does not exist; for example, \f(CR/dev/nvidiactl?\fR specifies that \f(CR/dev/nvidiactl\fR will only be mounted in the sandbox if it exists in the host filesystem. .IP If the source is in the Nix store, then its closure will be added to the sandbox as well. .IP Depending on how Nix was built, the default value for this option may be empty or provide \f(CR/bin/sh\fR as a bind-mount of \f(CRbash\fR. .IP \fBDefault:\fR \fIempty\fR .IP \fBDeprecated alias:\fR \f(CRbuild-chroot-dirs\fR, \f(CRbuild-sandbox-paths\fR .IP "\(bu" 3 \fB\f(CRsecret-key-files\fR\fR .IP A whitespace-separated list of files containing secret (private) keys. These are used to sign locally-built paths. They can be generated using \f(CRnix-store --generate-binary-cache-key\fR. The corresponding public key can be distributed to other users, who can add it to \f(CRtrusted-public-keys\fR in their \f(CRnix.conf\fR. .IP \fBDefault:\fR \fIempty\fR .IP "\(bu" 3 \fB\f(CRshow-trace\fR\fR .IP Whether Nix should print out a stack trace in case of Nix expression evaluation errors. .IP \fBDefault:\fR \f(CRfalse\fR .IP "\(bu" 3 \fB\f(CRssl-cert-file\fR\fR .IP The path of a file containing CA certificates used to authenticate \f(CRhttps://\fR downloads. Nix by default will use the first of the following files that exists: .RS .IP "1." 3 \f(CR/etc/ssl/certs/ca-certificates.crt\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "2." 3 \f(CR/nix/var/nix/profiles/default/etc/ssl/certs/ca-bundle.crt\fR .RE .IP The path can be overridden by the following environment variables, in order of precedence: .RS .IP "1." 3 \f(CRNIX_SSL_CERT_FILE\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "2." 3 \f(CRSSL_CERT_FILE\fR .RE .IP \fBDefault:\fR \f(CR/etc/ssl/certs/ca-certificates.crt\fR .IP "\(bu" 3 \fB\f(CRstalled-download-timeout\fR\fR .IP The timeout (in seconds) for receiving data from servers during download. Nix cancels idle downloads after this timeout\(cqs duration. .IP \fBDefault:\fR \f(CR300\fR .IP "\(bu" 3 \fB\f(CRstart-id\fR\fR .IP The first UID and GID to use for dynamic ID allocation. .IP \fBDefault:\fR \f(CR872415232\fR .IP "\(bu" 3 \fB\f(CRstore\fR\fR .IP The \fBURL of the Nix store\fR to use for most operations. See the \fBStore Types\fR section of the manual for supported store types and settings. .IP \fBDefault:\fR \f(CRauto\fR .IP "\(bu" 3 \fB\f(CRsubstitute\fR\fR .IP If set to \f(CRtrue\fR (default), Nix will use binary substitutes if available. This option can be disabled to force building from source. .IP \fBDefault:\fR \f(CRtrue\fR .IP \fBDeprecated alias:\fR \f(CRbuild-use-substitutes\fR .IP "\(bu" 3 \fB\f(CRsubstituters\fR\fR .IP A list of \fBURLs of Nix stores\fR to be used as substituters, separated by whitespace. A substituter is an additional \fBstore\fR from which Nix can obtain \fBstore objects\fR instead of building them. .IP Substituters are tried based on their priority value, which each substituter can set independently. Lower value means higher priority. The default is \f(CRhttps://cache.nixos.org\fR, which has a priority of 40. .IP At least one of the following conditions must be met for Nix to use a substituter: .RS .IP "\(bu" 3 The substituter is in the \fB\f(CRtrusted-substituters\fR\fR list .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 The user calling Nix is in the \fB\f(CRtrusted-users\fR\fR list .RE .IP In addition, each store path should be trusted as described in \fB\f(CRtrusted-public-keys\fR\fR .IP \fBDefault:\fR \f(CRhttps://cache.nixos.org/\fR .IP \fBDeprecated alias:\fR \f(CRbinary-caches\fR .IP "\(bu" 3 \fB\f(CRsync-before-registering\fR\fR .IP Whether to call \f(CRsync()\fR before registering a path as valid. .IP \fBDefault:\fR \f(CRfalse\fR .IP "\(bu" 3 \fB\f(CRsystem\fR\fR .IP The system type of the current Nix installation. Nix will only build a given \fBderivation\fR locally when its \f(CRsystem\fR attribute equals any of the values specified here or in \fB\f(CRextra-platforms\fR\fR. .IP The default value is set when Nix itself is compiled for the system it will run on. The following system types are widely used, as Nix is actively supported on these platforms: .RS .IP "\(bu" 3 \f(CRx86_64-linux\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \f(CRx86_64-darwin\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \f(CRi686-linux\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \f(CRaarch64-linux\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \f(CRaarch64-darwin\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \f(CRarmv6l-linux\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 \f(CRarmv7l-linux\fR .RE .IP In general, you do not have to modify this setting. While you can force Nix to run a Darwin-specific \f(CRbuilder\fR executable on a Linux machine, the result would obviously be wrong. .IP This value is available in the Nix language as \fB\f(CRbuiltins.currentSystem\fR\fR if the \fB\f(CReval-system\fR\fR configuration option is set as the empty string. .IP \fBDefault:\fR \f(CRx86_64-linux\fR .IP "\(bu" 3 \fB\f(CRsystem-features\fR\fR .IP A set of system “features” supported by this machine. .IP This complements the \fB\f(CRsystem\fR\fR and \fB\f(CRextra-platforms\fR\fR configuration options and the corresponding \fB\f(CRsystem\fR\fR attribute on derivations. .IP A derivation can require system features in the \fB\f(CRrequiredSystemFeatures\fR attribute\fR, and the machine to build the derivation must have them. .IP System features are user-defined, but Nix sets the following defaults: .RS .IP "\(bu" 3 \f(CRapple-virt\fR .RE .IP Included on Darwin if virtualization is available. .RS .IP "\(bu" 3 \f(CRkvm\fR .RE .IP Included on Linux if \f(CR/dev/kvm\fR is accessible. .RS .IP "\(bu" 3 \f(CRnixos-test\fR, \f(CRbenchmark\fR, \f(CRbig-parallel\fR .RE .IP These historical pseudo-features are always enabled for backwards compatibility, as they are used in Nixpkgs to route Hydra builds to specific machines. .RS .IP "\(bu" 3 \f(CRca-derivations\fR .RE .IP Included by default if the \fB\f(CRca-derivations\fR experimental feature\fR is enabled. .IP This system feature is implicitly required by derivations with the \fB\f(CR__contentAddressed\fR attribute\fR. .RS .IP "\(bu" 3 \f(CRrecursive-nix\fR .RE .IP Included by default if the \fB\f(CRrecursive-nix\fR experimental feature\fR is enabled. .RS .IP "\(bu" 3 \f(CRuid-range\fR .RE .IP On Linux, Nix can run builds in a user namespace where they run as root (UID 0) and have 65,536 UIDs available. This is primarily useful for running containers such as \f(CRsystemd-nspawn\fR inside a Nix build. For an example, see [\f(CRtests/systemd-nspawn/nix\fR][nspawn]. .IP [nspawn]: \fIhttps://github.com/NixOS/nix/blob/67bcb99700a0da1395fa063d7c6586740b304598/tests/systemd-nspawn.nix\fR. .IP Included by default on Linux if the \fB\f(CRauto-allocate-uids\fR\fR setting is enabled. .IP \fBDefault:\fR \fImachine-specific\fR .IP "\(bu" 3 \fB\f(CRtarball-ttl\fR\fR .IP The number of seconds a downloaded tarball is considered fresh. If the cached tarball is stale, Nix will check whether it is still up to date using the ETag header. Nix will download a new version if the ETag header is unsupported, or the cached ETag doesn\(cqt match. .IP Setting the TTL to \f(CR0\fR forces Nix to always check if the tarball is up to date. .IP Nix caches tarballs in \f(CR$XDG_CACHE_HOME/nix/tarballs\fR. .IP Files fetched via \f(CRNIX_PATH\fR, \f(CRfetchGit\fR, \f(CRfetchMercurial\fR, \f(CRfetchTarball\fR, and \f(CRfetchurl\fR respect this TTL. .IP \fBDefault:\fR \f(CR3600\fR .IP "\(bu" 3 \fB\f(CRtimeout\fR\fR .IP This option defines the maximum number of seconds that a builder can run. This is useful (for instance in an automated build system) to catch builds that are stuck in an infinite loop but keep writing to their standard output or standard error. It can be overridden using the \f(CR--timeout\fR command line switch. .IP The value \f(CR0\fR means that there is no timeout. This is also the default. .IP \fBDefault:\fR \f(CR0\fR .IP \fBDeprecated alias:\fR \f(CRbuild-timeout\fR .IP "\(bu" 3 \fB\f(CRtrace-function-calls\fR\fR .IP If set to \f(CRtrue\fR, the Nix evaluator will trace every function call. Nix will print a log message at the \(lqvomit\(rq level for every function entrance and function exit. .IP function-trace entered undefined position at 1565795816999559622 function-trace exited undefined position at 1565795816999581277 function-trace entered /nix/store/\[u2026]/example.nix:226:41 at 1565795253249935150 function-trace exited /nix/store/\[u2026]/example.nix:226:41 at 1565795253249941684 .IP The \f(CRundefined position\fR means the function call is a builtin. .IP Use the \f(CRcontrib/stack-collapse.py\fR script distributed with the Nix source code to convert the trace logs in to a format suitable for \f(CRflamegraph.pl\fR. .IP \fBDefault:\fR \f(CRfalse\fR .IP "\(bu" 3 \fB\f(CRtrace-verbose\fR\fR .IP Whether \f(CRbuiltins.traceVerbose\fR should trace its first argument when evaluated. .IP \fBDefault:\fR \f(CRfalse\fR .IP "\(bu" 3 \fB\f(CRtrust-tarballs-from-git-forges\fR\fR .IP If enabled (the default), Nix will consider tarballs from GitHub and similar Git forges to be locked if a Git revision is specified, e.g. \f(CRgithub:NixOS/patchelf/7c2f768bf9601268a4e71c2ebe91e2011918a70f\fR. This requires Nix to trust that the provider will return the correct contents for the specified Git revision. .IP If disabled, such tarballs are only considered locked if a \f(CRnarHash\fR attribute is specified, e.g. \f(CRgithub:NixOS/patchelf/7c2f768bf9601268a4e71c2ebe91e2011918a70f?narHash=sha256-PPXqKY2hJng4DBVE0I4xshv/vGLUskL7jl53roB8UdU%3D\fR. .IP \fBDefault:\fR \f(CRtrue\fR .IP "\(bu" 3 \fB\f(CRtrusted-public-keys\fR\fR .IP A whitespace-separated list of public keys. .IP At least one of the following condition must be met for Nix to accept copying a store object from another Nix store (such as a \fBsubstituter\fR): .RS .IP "\(bu" 3 the store object has been signed using a key in the trusted keys list .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 the \fB\f(CRrequire-sigs\fR\fR option has been set to \f(CRfalse\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 the store URL is configured with \f(CRtrusted=true\fR .if n \ .sp -1 .if t \ .sp -0.25v .IP "\(bu" 3 the store object is \fBcontent-addressed\fR .RE .IP \fBDefault:\fR \f(CRcache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=\fR .IP \fBDeprecated alias:\fR \f(CRbinary-cache-public-keys\fR .IP "\(bu" 3 \fB\f(CRtrusted-substituters\fR\fR .IP A list of \fBNix store URLs\fR, separated by whitespace. These are not used by default, but users of the Nix daemon can enable them by specifying \fB\f(CRsubstituters\fR\fR. .IP Unprivileged users (those set in only \fB\f(CRallowed-users\fR\fR but not \fB\f(CRtrusted-users\fR\fR) can pass as \f(CRsubstituters\fR only those URLs listed in \f(CRtrusted-substituters\fR. .IP \fBDefault:\fR \fIempty\fR .IP \fBDeprecated alias:\fR \f(CRtrusted-binary-caches\fR .IP "\(bu" 3 \fB\f(CRtrusted-users\fR\fR .IP A list of user names, separated by whitespace. These users will have additional rights when connecting to the Nix daemon, such as the ability to specify additional \fBsubstituters\fR, or to import unsigned realisations or unsigned input-addressed store objects. .IP You can also specify groups by prefixing names with \f(CR@\fR. For instance, \f(CR@wheel\fR means all users in the \f(CRwheel\fR group. .RS .IP \fBWarning\fR .IP Adding a user to \f(CRtrusted-users\fR is essentially equivalent to giving that user root access to the system. For example, the user can access or replace store path contents that are critical for system security. .RE .IP \fBDefault:\fR \f(CRroot\fR .IP "\(bu" 3 \fB\f(CRupgrade-nix-store-path-url\fR\fR .IP Used by \f(CRnix upgrade-nix\fR, the URL of the file that contains the store paths of the latest Nix release. .IP \fBDefault:\fR \f(CRhttps://github.com/NixOS/nixpkgs/raw/master/nixos/modules/installer/tools/nix-fallback-paths.nix\fR .IP "\(bu" 3 \fB\f(CRuse-case-hack\fR\fR .IP Whether to enable a macOS-specific hack for dealing with file name case collisions. .IP \fBDefault:\fR \f(CRfalse\fR .IP "\(bu" 3 \fB\f(CRuse-cgroups\fR\fR .IP Whether to execute builds inside cgroups. This is only supported on Linux. .IP Cgroups are required and enabled automatically for derivations that require the \f(CRuid-range\fR system feature. .IP \fBDefault:\fR \f(CRfalse\fR .IP "\(bu" 3 \fB\f(CRuse-registries\fR\fR .RS .IP \fBWarning\fR .IP This setting is part of an \fBexperimental feature\fR. .IP To change this setting, make sure the \fB\f(CRflakes\fR experimental feature\fR is enabled. For example, include the following in \fB\f(CRnix.conf\fR\fR: .LP .EX extra-experimental-features = flakes use-registries = ... .EE .RE .IP Whether to use flake registries to resolve flake references. .IP \fBDefault:\fR \f(CRtrue\fR .IP "\(bu" 3 \fB\f(CRuse-sqlite-wal\fR\fR .IP Whether SQLite should use WAL mode. .IP \fBDefault:\fR \f(CRtrue\fR .IP "\(bu" 3 \fB\f(CRuse-xdg-base-directories\fR\fR .IP If set to \f(CRtrue\fR, Nix will conform to the \fBXDG Base Directory Specification\fR for files in \f(CR$HOME\fR. The environment variables used to implement this are documented in the \fBEnvironment Variables section\fR. .RS .IP \fBWarning\fR This changes the location of some well-known symlinks that Nix creates, which might break tools that rely on the old, non-XDG-conformant locations. .RE .IP In particular, the following locations change: .TS tab(|) expand allbox; lb lb l l. T{ Old T}|T{ New T} T{ \f(CR\(ti/.nix-profile\fR T}|T{ \f(CR$XDG_STATE_HOME/nix/profile\fR T} T{ \f(CR\(ti/.nix-defexpr\fR T}|T{ \f(CR$XDG_STATE_HOME/nix/defexpr\fR T} T{ \f(CR\(ti/.nix-channels\fR T}|T{ \f(CR$XDG_STATE_HOME/nix/channels\fR T} .TE .IP If you already have Nix installed and are using \fBprofiles\fR or \fBchannels\fR, you should migrate manually when you enable this option. If \f(CR$XDG_STATE_HOME\fR is not set, use \f(CR$HOME/.local/state/nix\fR instead of \f(CR$XDG_STATE_HOME/nix\fR. This can be achieved with the following shell commands: .LP .EX nix_state_home=${XDG_STATE_HOME-$HOME/.local/state}/nix mkdir -p $nix_state_home mv $HOME/.nix-profile $nix_state_home/profile mv $HOME/.nix-defexpr $nix_state_home/defexpr mv $HOME/.nix-channels $nix_state_home/channels .EE .IP \fBDefault:\fR \f(CRfalse\fR .IP "\(bu" 3 \fB\f(CRuser-agent-suffix\fR\fR .IP String appended to the user agent in HTTP requests. .IP \fBDefault:\fR \fIempty\fR .IP "\(bu" 3 \fB\f(CRwarn-dirty\fR\fR .IP Whether to warn about dirty Git/Mercurial trees. .IP \fBDefault:\fR \f(CRtrue\fR .IP "\(bu" 3 \fB\f(CRwarn-large-path-threshold\fR\fR .IP Warn when copying a path larger than this number of bytes to the Nix store (as determined by its NAR serialisation). .IP \fBDefault:\fR \f(CR-1\fR