aboutsummaryrefslogtreecommitdiff
path: root/src/libstore/globals.hh
AgeCommit message (Collapse)Author
2021-11-12Adds an accept-flake-config flagTom Bereknyei
2021-10-26Make experimental-features a proper typeregnat
Rather than having them plain strings scattered through the whole codebase, create an enum containing all the known experimental features. This means that - Nix can now `warn` when an unkwown experimental feature is passed (making it much nicer to spot typos and spot deprecated features) - It’s now easy to remove a feature altogether (once the feature isn’t experimental anymore or is dropped) by just removing the field for the enum and letting the compiler point us to all the now invalid usages of it.
2021-07-21Tweak --no/use-registries doc stringsEelco Dolstra
2021-07-16Add use-registries config option (and deprecate --no-registries flag)Alexander Bantyev
Some people want to avoid using registries at all on their system; Instead of having to add --no-registries to every command, this commit allows to set use-registries = false in the config. --no-registries is still allowed everywhere it was allowed previously, but is now deprecated. Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2021-05-12doc: mention Priority for substitutersLorenzo Manacorda
2021-04-23Replace the trailing markdown spaces by a backslashregnat
They are equivalent according to <https://spec.commonmark.org/0.29/#hard-line-breaks>, and the trailing spaces tend to be a pain (because the make git complain, editors tend to want to remove them − the `.editorconfig` actually specifies that − etc..).
2021-03-23nix.conf builders: refer to manual pageDavHau
2021-03-04improve man page for nix.conf (builders)DavHau
2021-02-25Apply @edolstra stylistic suggestionsThéophane Hufschmitt
Mostly removing useless comments and adding spaces before `&` Co-authored-by: Eelco Dolstra <edolstra@gmail.com>
2021-02-25Don't crash when copying realisations to a non-ca remoteregnat
Rather throw a proper exception, and catch&log it on the client side
2021-02-24Bail if plugin-files is set after plugins have been loaded.Shea Levy
We know the flag will be ignored but the user wants it to take effect.
2021-02-22Warn about instability of plugin APIShea Levy
2021-01-06Merge pull request #4310 from matthewbauer/rosetta2-extra-platformsEelco Dolstra
Add x86_64-darwin and aarch64 to "extra-platforms" automatically when Rosetta2 is detected
2020-12-06Always default to cache.nixos.org even when different nix store dirMatthew Bauer
Since 0744f7f, it is now useful to have cache.nixos.org in substituers even if /nix/store is not the Nix Store Dir. This can always be overridden via configuration, though.
2020-12-03Add extraPlatforms for Rosetta 2 macOSMatthew Bauer
macOS systems with ARM64 can utilize a translation layer at /Library/Apple/usr/libexec/oah to run x86_64 binaries. This change makes Nix recognize that and it to "extra-platforms". Note that there are two cases here since Nix could be built for either x86_64 or aarch64. In either case, we can switch to the other architecture. Unfortunately there is not a good way to prevent aarch64 binaries from being run in x86_64 contexts or vice versa - programs can always execute programs for the other architecture.
2020-12-02fix tokens documentationGreg Hale
2020-10-29Generalize extra-* settingsEelco Dolstra
This removes the extra-substituters and extra-sandbox-paths settings and instead makes every array setting extensible by setting "extra-<name> = <value>" in the configuration file or passing "--<name> <value>" on the command line.
2020-09-30StyleEelco Dolstra
2020-09-29Remove github-access-token in favor of access-token.Kevin Quick
2020-09-29Merge branch 'master' into access-tokensKevin Quick
2020-09-25Merge remote-tracking branch 'origin/master' into github-api-tokenGregory Hale
2020-09-25Re-add support for github-access-token, but mark as deprecated.Kevin Quick
2020-09-25Fix reference to older name for access-tokens config value.Kevin Quick
2020-09-24Update to use access-tokens configuration for github/gitlab access.Kevin Quick
This change provides support for using access tokens with other instances of GitHub and GitLab beyond just github.com and gitlab.com (especially company-specific or foundation-specific instances). This change also provides the ability to specify the type of access token being used, where different types may have different handling, based on the forge type.
2020-09-22Merge pull request #4038 from maljub01/masterEelco Dolstra
Add a nix.conf option for allowing a symlinked store
2020-09-21Don't include nlohmann/json.hpp in globals.hhEelco Dolstra
This reduces compilation time by 207s. Issue #4045.
2020-09-21Update the variable name accordinglyMarwan Aljubeh
2020-09-21Use a better name for the config optionMarwan Aljubeh
2020-09-18Lint issue: replacing tabs with spacesMarwan Aljubeh
2020-09-18Add a nix.conf option for allowing a symlinked storeMarwan Aljubeh
2020-09-16Fetch commits from github/gitlab using Auth headerGreg Hale
`nix flake info` calls the github 'commits' API, which requires authorization when the repository is private. Currently this request fails with a 404. This commit adds an authorization header when calling the 'commits' API. It also changes the way that the 'tarball' API authenticates, moving the user's token from a query parameter into the Authorization header. The query parameter method is recently deprecated and will be disallowed in November 2020. Using them today triggers a warning email.
2020-09-16Don't include nlohmann/json.hpp in config.hhregnat
Instead make a separate header with the template implementation of `BaseSetting<T>::toJSONObj` that can be included where needed
2020-09-03Remove gc-check-reachabilityEelco Dolstra
2020-08-19Generate the nix.conf docs from the source codeEelco Dolstra
This means we don't have two (divergent) sets of option descriptions anymore.
2020-08-06Add hashed-mirrors backMatthew Bauer
Some users have their own hashed-mirrors setup, that is used to mirror things in addition to what’s available on tarballs.nixos.org. Although this should be feasable to do with a Binary Cache, it’s not always easy, since you have to remember what "name" each of the tarballs has. Continuing to support hashed-mirrors is cheap, so it’s best to leave support in Nix. Note that NIX_HASHED_MIRRORS is also supported in Nixpkgs through fetchurl.nix. Note that this excludes tarballs.nixos.org from the default, as in \#3689. All of these are available on cache.nixos.org.
2020-07-30Merge remote-tracking branch 'origin/master' into substitute-other-storedirMatthew Bauer
2020-07-14Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-07-10Merge remote-tracking branch 'origin/master' into substitute-other-storedirMatthew Bauer
2020-07-08Make LocalStore::addToStore(srcPath) run in constant memoryEelco Dolstra
This reduces memory consumption of nix-instantiate \ -E 'with import <nixpkgs> {}; runCommand "foo" { src = ./blender; } "echo foo"' \ --option nar-buffer-size 10000 (where ./blender is a 1.1 GiB tree) from 1716 to 36 MiB, while still ensuring that we don't do any write I/O for small source paths (up to 'nar-buffer-size' bytes). The downside is that large paths are now always written to a temporary location in the store, even if they produce an already valid store path. Thus, adding large paths might be slower and run out of disk space. ¯\_(ツ)_/¯ Of course, you can always restore the old behaviour by setting 'nar-buffer-size' to a very high value.
2020-07-06Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-07-02move showTrace to new loggerSettingsBen Burdette
2020-06-17Merge remote-tracking branch 'origin/master' into substitute-other-storedirMatthew Bauer
2020-06-17Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-06-12Remove hashed-mirrorsMatthew Bauer
2020-06-09Disable extra-platforms = i686-linux on wsl1 (#3676)Matthew Bauer
WSL1 doesn’t support i686-linux emulation, see https://github.com/microsoft/wsl/issues/2468
2020-04-16Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-04-14add NIX_USER_CONF_FILESzimbatm
Motivation: maintain project-level configuration files. Document the whole situation a bit better so that it corresponds to the implementation, and add NIX_USER_CONF_FILES that allows overriding which user files Nix will load during startup.
2020-04-07Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra
2020-04-07Backport libfetchers from the flakes branchEelco Dolstra
This provides a pluggable mechanism for defining new fetchers. It adds a builtin function 'fetchTree' that generalizes existing fetchers like 'fetchGit', 'fetchMercurial' and 'fetchTarball'. 'fetchTree' takes a set of attributes, e.g. fetchTree { type = "git"; url = "https://example.org/repo.git"; ref = "some-branch"; rev = "abcdef..."; } The existing fetchers are just wrappers around this. Note that the input attributes to fetchTree are the same as flake input specifications and flake lock file entries. All fetchers share a common cache stored in ~/.cache/nix/fetcher-cache-v1.sqlite. This replaces the ad hoc caching mechanisms in fetchGit and download.cc (e.g. ~/.cache/nix/{tarballs,git-revs*}). This also adds support for Git worktrees (c169ea59049f861aaba429f48b828d0820b74d1d).
2020-03-23Merge remote-tracking branch 'origin/master' into flakesEelco Dolstra