aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2023-07-19fix wordingValentin Gagarin
Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-07-19add cross-linksValentin Gagarin
2023-07-19shorten `system` setting descriptionValentin Gagarin
2023-07-19move docs of the current system to the system settingValentin Gagarin
add information what happens when Nix itself is cross-compiled
2023-07-19one line per sentence for easier reviewValentin Gagarin
2023-07-17Merge pull request #8342 from NixLayeredStore/best-effort-supplementary-groupsThéophane Hufschmitt
Best effort supplementary groups
2023-07-14Test nested sandboxing, and make nicer errorJohn Ericson
We were bedeviled by sandboxing issues when working on the layered store. The problem ended up being that when we have nested nix builds, and the inner store is inside the build dir (e.g. store is `/build/nix-test/$name/store`, build dir is `/build`) bind mounts clobber each other and store paths cannot be found. After thoroughly cleaning up `local-derivation-goal.cc`, we might be able to make that work. But that is a lot of work. For now, we just fail earlier with a proper error message. Finally, test this: nested sandboxing without the problematic store dir should work, and with should fail with the expected error message. Co-authored-by: Dylan Green <67574902+cidkidnix@users.noreply.github.com> Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-07-12Move `BuiltPath` to its own header/C++ file in libcmdJohn Ericson
It is less important, and used less widely, than `DerivedPath`.
2023-07-12Update src/libstore/globals.hhBen Radford
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-07-12Update src/libstore/globals.hhBen Radford
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-07-11Say a bit about default value in setting description.Ben Radford
2023-07-11Default should depend on whether we are root.Ben Radford
2023-07-11Be clearer about the security implications.Ben Radford
2023-07-11Update description for require-drop-supplementary-groups.Ben Radford
2023-07-11Always attempt setgroups but allow failure to be ignored.Ben Radford
2023-07-11Merge remote-tracking branch 'origin/master' into ↵Ben Radford
best-effort-supplementary-groups
2023-07-10Merge pull request #8579 from obsidiansystems/findPath-cleanup-2John Ericson
Further search path cleanups
2023-07-10Merge pull request #8681 from inclyc/libexpr/parser-move-noeffectEelco Dolstra
libexpr: remove std::move() for `basePath` in parser, it has no effect
2023-07-10Fix some grammar in installables doc (#8682)Bader AlAttar
2023-07-10libexpr: remove std::move() for `basePath` in parser, it has no effectYingchi Long
2023-07-09Merge pull request #8370 from hercules-ci/fetchClosure-input-addressedJohn Ericson
`fetchClosure`: input addressed and pure
2023-07-09Clean up `SearchPath`John Ericson
- Better types - Own header / C++ file pair - Test factored out methods - Pass parsed thing around more than strings Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
2023-07-09Clean up `resolveSearchPathElem`John Ericson
We should use `std::optional<std::string>` not `std::pair<bool, std::string>` for an optional string.
2023-07-07fetchClosure: Interleave the examples in the docsRobert Hensing
2023-07-07fetchClosure: Apply suggestions from code reviewRobert Hensing
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-07-05Merge pull request #8631 from iFreilicht/profile-listEelco Dolstra
Profile list improvements
2023-07-04Document the path flakeref format (#8640)Théophane Hufschmitt
* Document the path flakeref format Fix https://github.com/NixOS/nix/issues/8482 Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-07-03nix profile list: Add --json flagEelco Dolstra
This just dumps the profile manifest to stdout.
2023-07-03Rename 'resolvedRef' to 'lockedRef'Eelco Dolstra
'resolvedRef' was incorrect, since a resolved ref is one after registry resolution, which may still be unlocked (e.g. 'nixpkgs' -> 'github:NixOS/nixpkgs').
2023-07-03libexpr: use `thread_local` to make the parser thread-safeYingchi Long
If we call `adjustLoc`, the global variable `prev_yylloc` is shared between threads and racy. Currently, nix itself does not concurrently parsing files, but this is helpful for libexpr users. (The parser is thread-safe except this.)
2023-07-02nix profile list: Improve readability of the outputEelco Dolstra
2023-07-01Merge pull request #8566 from inclyc/nixd/value-print-depthRobert Hensing
libexpr: extend `Value::print` to allow limited depth
2023-06-30fetchClosure: Docs and error message improvementsRobert Hensing
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-06-30doc: Improve `fetchClosure` documentationRobert Hensing
2023-06-30fetchClosure: Refactor: replace enableRewritingRobert Hensing
A single variable is nice and self-contained.
2023-06-30fetchClosure: Split into three casesRobert Hensing
2023-06-30makeContentAddressed: Add single path helperRobert Hensing
2023-06-30fetchClosure: Disallow toPath for inputAddressed = trueRobert Hensing
2023-06-30fetchClosure: Always check that inputAddressed matches the resultRobert Hensing
2023-06-30fetchClosure: Allow input addressed paths in pure modeRobert Hensing
When explicitly requested by the caller, as suggested in the meeting (https://github.com/NixOS/nix/pull/8090#issuecomment-1531139324) > @edolstra: { toPath } vs { fromPath } is too implicit I've opted for the `inputAddressed = true` requirement, because it we did not agree on renaming the path attributes. > @roberth: more explicit > @edolstra: except for the direction; not immediately clear in which direction the rewriting happens This is in fact the most explicit syntax and a bit redundant, which is good, because that redundancy lets us deliver an error message that reminds expression authors that CA provides a better experience to their users.
2023-06-30fetchClosure: Refactor: rename toCA -> enableRewritingRobert Hensing
2023-06-30fetchClosure: Factor out attribute hintRobert Hensing
2023-06-30linkOrCopy: Fallback upon cross-device link error (EXDEV)Yueh-Shun Li
Fix building derivations in local chroot store on OpenAFS, where hard linking accross directories causes cross-device link error (EXDEV).
2023-06-30Merge pull request #8589 from jfroche/sign-paths-as-allowed-userEelco Dolstra
Allow to sign path as unprivileged user
2023-06-29Merge pull request #8600 from inclyc/libexpr/fix-leaking-in-stripIndentationRobert Hensing
libexpr: fix leaking `es2` in stripIndentation (parser.y)
2023-06-28libexpr: fix leaking `es2` in stripIndentation (parser.y)Yingchi Long
2023-06-27Allow to sign path as unprivileged userJean-François Roche
User can now sign path as unprivileged/allowed user refs #1708
2023-06-27Automatically document builtin constantsJohn Ericson
This is done in roughly the same way builtin functions are documented. Also auto-link experimental features for primops, subsuming PR #8371. Co-authored-by: Eelco Dolstra <edolstra@gmail.com> Co-authored-by: Robert Hensing <roberth@users.noreply.github.com> Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-06-27Generialize `showType`John Ericson
2023-06-27nix flake check: improve error message if overlay is not a lambda (#8582)Maximilian Bosch
* nix flake check: improve error message if overlay is not a lambda Suppose you have an overlay like this { inputs = { /* ... */ }; outputs = { flake-utils, ... }: flake-utils.lib.eachDefaultSystem (system: { overlays.default = final: prev: { }; }); } then `nix flake check` (correctly) fails because `overlays` are supposed to have the structure `overlays.<name> = final: prev: exp`. However, the error-message is a little bit counter-intuitive: error: overlay does not take an argument named 'final' While one might guess where the error actually comes from because the trace above says `… while checking the overlay 'overlays.x86_64-linux'` this is still pretty confusing because it complains about an argument not being named `final` even though that's evidently the case. With this change, the error-message actually makes it clear what's wrong: [ma27@carsten:~/Projects/nix/tmp]$ nix flake check --extra-experimental-features 'nix-command flakes' path:$(pwd) error: … while checking flake output 'overlays' at /nix/store/clgblnxx003hyrq8qkz5ab6kgqkck6qc-source/flake.nix:4:5: 3| outputs = { ... }: { 4| overlays.x86_64-linux.snens = final: prev: { | ^ 5| kek = throw "snens"; … while checking the overlay 'overlays.x86_64-linux' at /nix/store/clgblnxx003hyrq8qkz5ab6kgqkck6qc-source/flake.nix:4:5: 3| outputs = { ... }: { 4| overlays.x86_64-linux.snens = final: prev: { | ^ 5| kek = throw "snens"; error: overlay is not a lambda, but a set instead