aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2022-11-08Split auto UID allocation from cgroupsEelco Dolstra
Cgroups are now only used for derivations that require the uid-range range feature. This allows auto UID allocation even on systems that don't have cgroups (like macOS). Also, make things work on modern systems that use cgroups v2 (where there is a single hierarchy and no "systemd" controller).
2022-11-04Remove stray tabEelco Dolstra
2022-11-04Fix indentationEelco Dolstra
2022-11-03Merge remote-tracking branch 'origin/master' into auto-uid-allocationEelco Dolstra
2022-10-31Merge pull request #7231 from jfroche/fix/savedArgv-accessEelco Dolstra
Move savedArgv into libmain
2022-10-31Merge pull request #7039 from Mic92/libfetchers-variantThéophane Hufschmitt
libfetchers: avoid api.github.com ratelimit if no github token is set
2022-10-28Move savedArgv into libmainJean-François Roche
`savedArgv` is not accessible by plugins when defined in main binary. Moving it into one of the nix lib fix the problem.
2022-10-27Merge pull request #7217 from NixOS/restore-nix-build-remoteEelco Dolstra
Fix `nix __build-remote`
2022-10-27Pass the right argv when calling the build hookThéophane Hufschmitt
Call it as `['nix', '__build-remote', ... ]` rather than the previous `["__build-remote", "nix __build-remote", ... ]` which seemed to have been most likely unintended
2022-10-26Merge pull request #7174 from agbrooks/git-tag-bugEelco Dolstra
Prevent fetchGit from using incorrect cached rev for different refs
2022-10-26Fix `nix __build-remote`Théophane Hufschmitt
Because of a wrong index, `nix __build-remote` wasn't working. Fix the index to restore the command (and the build hook).
2022-10-26nix run: fix "'defaultApp.x86_64-linux' should have type 'derivation'"Yorick van Pelt
2022-10-25Merge pull request #7206 from akiekintveld/masterThéophane Hufschmitt
Defer to SSH config files for ForwardAgent option
2022-10-25Merge pull request #7207 from NixOS/flake-typeEelco Dolstra
Mark flakes with ._type = "flake".
2022-10-25Use _typeEelco Dolstra
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2022-10-24Improve --profile descriptionMichal Sojka
The description of the --profile option talks about the "update" operation. This is probably meant for operations such as "nix profile install", but the same option is reused in other subcommands, which do not update the profile, such as "nix profile {list,history,diff-closures}". We update the description to make sense in both contexts.
2022-10-23Mark flakes with .type = "flake".Shea Levy
Fixes #7186
2022-10-22Defer to SSH config files for ForwardAgent optionAustin Kiekintveld
Currently, Nix passes `-a` when it runs commands on a remote machine via SSH, which disables agent forwarding. This causes issues when the `ForwardAgent` option is set in SSH config files, as the command line operation always overrides those. In particular, this causes issues if the command being run is `sudo` and the remote machine is configured with the equivalent of NixOS's `security.pam.enableSSHAgentAuth` option. Not allowing SSH agent forwarding can cause authentication to fail unexpectedly. This can currently be worked around by setting `NIX_SSHOPTS="-A"`, but we should defer to the options in the SSH config files to be least surprising for users.
2022-10-19Merge pull request #7183 from n8henrie/patch-1Eelco Dolstra
Fix typo -- dashes not underscores
2022-10-18Implement BinaryCacheStore::queryPathFromHashPart()Eelco Dolstra
2022-10-18Add command 'nix store path-from-hash-part'Eelco Dolstra
This exposes the Store::queryPathFromHashPart() interface in the CLI.
2022-10-17Fix typo -- dashes not underscoresNathan Henrie
2022-10-14Fix #7146Andrew Brooks
When fetching a non-local git repo by ref (and no rev), don't consider unrelated cached revs for the same repository.
2022-10-14Merge pull request #7168 from NixOS/rosetta-testEelco Dolstra
Improve Rosetta detection
2022-10-14libmain: Make the entire stack overflow handler pluggableRobert Hensing
2022-10-14libmain: Add extraStackOverflowHandlerRobert Hensing
2022-10-14Remove useless debug statementsEelco Dolstra
We haven't parsed the '-v' command line flags yet when this code executes, so we can't actually get debug output here.
2022-10-14Use /usr/bin/trueEelco Dolstra
2022-10-13Fix error display if execve() in the builder failsEelco Dolstra
After we've send "\2\n" to the parent, we can't send a serialized exception anymore. It will show up garbled like $ nix-build --store /tmp/nix --expr 'derivation { name = "foo"; system = "x86_64-linux"; builder = "/foo/bar"; }' this derivation will be built: /nix/store/xmdip0z5x1zqpp6gnxld3vqng7zbpapp-foo.drv building '/nix/store/xmdip0z5x1zqpp6gnxld3vqng7zbpapp-foo.drv'... ErrorErrorEexecuting '/foo/bar': No such file or directory error: builder for '/nix/store/xmdip0z5x1zqpp6gnxld3vqng7zbpapp-foo.drv' failed with exit code 1
2022-10-13Improve Rosetta detectionEelco Dolstra
Turns out that one of those *.plist files can exist even if Rosetta is not installed. So let's just try to run an x86_64-darwin binary directly.
2022-10-13Fix clang warningsEelco Dolstra
2022-10-13Merge pull request #7140 from crawford/chroot-storeEelco Dolstra
Make warning about chroot store location more accurate
2022-10-12Make warning about chroot store location more accurateSteam Deck User
While trying to use an alternate directory for my Nix installation, I noticed that nix's output didn't reflect the updated state directory. This patch corrects that and now prints the warning before attempting to create the directory (if the directory creation fails, it wouldn't have been obvious why nix was attempting to create the directory in the first place). With this patch, I now get the following warning: warning: '/home/deck/.var/app/org.nixos.nix/var/nix' does not exist, so Nix will use '/home/deck/.local/share/nix/root' as a chroot store
2022-10-12Move some options into a misc categoryEelco Dolstra
This unclutters the per-command options a bit by moving out some global options.
2022-10-12Merge branch 'print-common-flags' of github.com:Hoverbear/nixEelco Dolstra
2022-10-12Merge pull request #7149 from amjoseph-nixpkgs/pr/intersectAttrs/valuesEelco Dolstra
parseDrvName: remove doc/impl discrepancy, add test covering the gap
2022-10-08src/libexpr/primops.cc: parseDrvName: make documentation follow implementationAdam Joseph
The documentation for `parseDrvName` does not agree with the implementation when the derivation name contains a dash which is followed by something that is neither a letter nor a digit. This commit corrects the documentation to agree with the implementation.
2022-10-07Print common flags in --helpAna Hobden
2022-10-05Merge pull request #6870 from ↵Valentin Gagarin
amjoseph-nixpkgs/pr/doc/explain-local-remote-binary-substituter
2022-10-01libfetchers: avoid api.github.com ratelimit if no github token is setJörg Thalheim
If we don't have any github token, we won't be able to fetch private repos, but we are also more likely to run into API limits since we don't have a token. To mitigate this only ever use the github api if we actually have a token.
2022-09-30Merge pull request #7080 from squalus/nar-close-fileEelco Dolstra
archive: check close errors when extracting nars
2022-09-27nix-build: remove unused --add-root argLinus Heckemann
Fixes #1982
2022-09-26Merge pull request #7089 from NixOS/mention-accept-flake-config-in-warningEelco Dolstra
Mention `--accept-flake-config` in the related warning
2022-09-24src/libexpr/primops.cc: correct definition for intersectAttrsAdam Joseph
The current definition of `intersectAttrs` is incorrect: > Return a set consisting of the attributes in the set e2 that also exist in the > set e1. Recall that (Nix manual, section 5.1): > An attribute set is a collection of name-value-pairs (called attributes) According to the existing description of `intersectAttrs`, the following should evaluate to the empty set, since no key-value *pair* (i.e. attribute) exists in both sets: ``` builtins.intersectAttrs { x=3; } {x="foo";} ``` And yet: ``` nix-repl> builtins.intersectAttrs { x=3; } {x="foo";} { x = "foo"; } ``` Clearly the intent here was for the *names* of the resulting attribute set to be the intersection of the *names* of the two arguments, and for the values of the resulting attribute set to be the values from the second argument. This commit corrects the definition, making it match the implementation and intent.
2022-09-24Merge pull request #7010 from edolstra/ignore-shellThéophane Hufschmitt
nix develop: Ignore stdenv's $SHELL
2022-09-24Merge pull request #7078 from obsidiansystems/trustworthy-signatureThéophane Hufschmitt
"valid signature" -> "signature by a trusted key"
2022-09-24Merge pull request #7079 from matthewbauer/allow-untrusted-settingsThéophane Hufschmitt
Allow pass max-silent-time and build-poll-interval to daemon untrusted
2022-09-24Mention `--accept-flake-config` in the related warningThéophane Hufschmitt
Make sure that people who run Nix in non-interactive mode (and so don't have the possibility to interactively accept the individual flake configuration settings) are aware of this flag. Fix #7086
2022-09-24Merge pull request #7059 from NixOS/remove-useless-ca-file-messageEelco Dolstra
Remove a useless debug message in filetransfer.cc
2022-09-23Apply suggestions from code reviewJohn Ericson
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io> Co-authored-by: Rune K. Svendsen <runesvend@gmail.com>