mergify[bot] and GitHub
8ebaa79939
Merge pull request #97 from nix-community/update_flake_lock_action
...
flake.lock: Update
2022-08-01 02:05:26 +00:00
github-actions[bot]
9c779cc520
flake.lock: Update
...
Flake lock file updates:
• Updated input 'nixpkgs':
'github:NixOS/nixpkgs/ce49cb7792a7ffd65ef352dda1110a4e4a204eac' (2022-07-26)
→ 'github:NixOS/nixpkgs/7b9be38c7250b22d829ab6effdee90d5e40c6e5c' (2022-07-30)
2022-08-01 02:01:16 +00:00
Jeremy Fleischman
297f6b5d56
Fix link to hacking doc
...
Right now,
https://hydra.nixos.org/job/nix/master/build.x86_64-linux/latest/download-by-type/doc/manual/contributing/hacking.html
redirects to
https://hydra.nixos.org/build/183877779/download/1/manual/contributing/hacking.html ,
which gives me a "500 Internal Server Error". Not super useful =(
Feel free to ignore if someone's working to fix the 500 I was running
into.
2022-07-30 09:12:50 -07:00
Rok Garbas and GitHub
e9178d7d4a
Merge pull request #6844 from centromere/custom-nix-conf
...
docker.nix: Allow Nix configuration to be customized
2022-07-29 13:47:24 +02:00
27138f1ec6
manual: use singular in body, too
...
Co-authored-by: Cole Helbling <cole.e.helbling@outlook.com >
2022-07-28 23:30:07 +02:00
Valentin Gagarin
41a3b315fd
manual: values -> data types
2022-07-28 17:25:25 +02:00
Valentin Gagarin
8f4fab8fab
manual: use singular for headings
2022-07-28 17:25:18 +02:00
Valentin Gagarin
4ff48854b8
manual: simple values -> primitives
...
"simple" is a loaded term
2022-07-28 17:23:57 +02:00
Valentin Gagarin
3063e5b94c
manual: use subheadings for primitive types
...
this gives us HTML anchors for each of them
2022-07-28 17:23:57 +02:00
Eelco Dolstra and GitHub
86fcd4f692
Merge pull request #6845 from fricklerhandwerk/attrset
...
manual: set -> attribute set
2022-07-28 16:55:03 +02:00
Valentin Gagarin
85cdaebcd6
manual: set -> attribute set
...
reword description to have shorter sentences.
2022-07-28 16:10:24 +02:00
Valentin Gagarin
be4654c344
manual: fix section title in table of contents
2022-07-28 15:55:41 +02:00
Alex Wied
228028fc1a
docker.nix: Allow Nix configuration to be customized
2022-07-28 03:36:39 -04:00
mergify[bot] and GitHub
a71d7a0c3b
Merge pull request #96 from nix-community/update_flake_lock_action
...
flake.lock: Update
2022-07-28 01:57:40 +00:00
github-actions[bot]
36a57a6658
flake.lock: Update
...
Flake lock file updates:
• Updated input 'nixpkgs':
'github:NixOS/nixpkgs/e494a908e8895b9cba18e21d5fc83362f64b3f6a' (2022-07-24)
→ 'github:NixOS/nixpkgs/ce49cb7792a7ffd65ef352dda1110a4e4a204eac' (2022-07-26)
2022-07-28 01:49:12 +00:00
mergify[bot] and GitHub
05b339ae08
Merge pull request #95 from nix-community/update_flake_lock_action
...
flake.lock: Update
2022-07-25 01:56:27 +00:00
github-actions[bot]
1434796429
flake.lock: Update
...
Flake lock file updates:
• Updated input 'nixpkgs':
'github:NixOS/nixpkgs/614a842b74b7a1497e8cfca7c61bec38f51911b3' (2022-07-20)
→ 'github:NixOS/nixpkgs/e494a908e8895b9cba18e21d5fc83362f64b3f6a' (2022-07-24)
2022-07-25 01:50:38 +00:00
Théophane Hufschmitt and GitHub
2805439335
Merge pull request #6814 from amjoseph-nixpkgs/pr/sandbox-error-messages
...
local-derivation-goal.cc: improve error messages when sandboxing fails
2022-07-22 13:27:52 +02:00
Théophane Hufschmitt and GitHub
e10807cdbb
Merge pull request #6813 from centromere/cgroup-cpu-detection
...
libstore/globals.cc: Automatically set cores based on cgroup CPU limit
2022-07-22 10:15:32 +02:00
92bae33ca5
nix shell: example shouldn't use an absolute path for the shell
...
Co-authored-by: Eelco Dolstra <edolstra@gmail.com >
2022-07-21 14:25:07 +02:00
mergify[bot] and GitHub
0b4bcf9bbd
Merge pull request #94 from nix-community/update_flake_lock_action
...
flake.lock: Update
2022-07-21 01:59:03 +00:00
github-actions[bot]
76285edc53
flake.lock: Update
...
Flake lock file updates:
• Updated input 'nixpkgs':
'github:NixOS/nixpkgs/8f485713f5e6b6883a9b6959afa98688360a3ecb' (2022-07-16)
→ 'github:NixOS/nixpkgs/614a842b74b7a1497e8cfca7c61bec38f51911b3' (2022-07-20)
2022-07-21 01:51:04 +00:00
Solène Rapenne
64404220f5
nix shell: document how to invoke multiple commands from the command line
2022-07-20 14:54:46 +02:00
Théophane Hufschmitt and GitHub
7ed91d6c6a
Merge branch 'master' into parallel-nix-copy
2022-07-20 10:05:34 +02:00
Alex Wied
722de8ddcc
libstore/globals.cc: Move cgroup detection to libutil
2022-07-19 16:25:53 -04:00
Alex Wied
1af5d798a4
libstore/globals.cc: Automatically set cores based on cgroup CPU limit
...
By default, Nix sets the "cores" setting to the number of CPUs which are
physically present on the machine. If cgroups are used to limit the CPU
and memory consumption of a large Nix build, the OOM killer may be
invoked.
For example, consider a GitLab CI pipeline which builds a large software
package. The GitLab runner spawns a container whose CPU is limited to 4
cores and whose memory is limited to 16 GiB. If the underlying machine
has 64 cores, Nix will invoke the build with -j64. In many cases, that
level of parallelism will invoke the OOM killer and the build will
completely fail.
This change sets the default value of "cores" to be
ceil(cpu_quota / cpu_period), with a fallback to
std::thread::hardware_concurrency() if cgroups v2 is not detected.
2022-07-19 16:03:58 -04:00
Théophane Hufschmitt
56f6f3725f
Don't ultimately trust the signed paths
...
Like the old implem did (and like you'd want it to be anyways)
2022-07-19 19:46:00 +02:00
Adam Joseph
36e1383b6b
local-derivation-goal.cc: save global errno to the stack before performing tests which might clobber it
2022-07-19 03:53:20 -07:00
Adam Joseph
a9e75eca00
error.hh: add additional constructor with explicit errno argument
2022-07-19 03:49:33 -07:00
Adam Joseph
99fcc91f67
as requested by @thufschmitt https://github.com/NixOS/nix/pull/6814#discussion_r924275777
2022-07-19 03:33:12 -07:00
Adam Joseph
5f51539f88
change warn() to notice()
2022-07-19 03:30:52 -07:00
Théophane Hufschmitt and GitHub
fbd0a6c6e2
Merge pull request #6784 from tweag/completion-test
...
Add some tests for the CLI completion
2022-07-18 20:32:14 +02:00
Eelco Dolstra and GitHub
2584c151bd
Merge pull request #6812 from lovesegfault/rosetta-paths
...
fix(libstore): allow Nix to access all Rosetta 2 paths on MacOS
2022-07-18 14:09:54 +02:00
mergify[bot] and GitHub
32c741a46d
Merge pull request #92 from nix-community/update_flake_lock_action
...
flake.lock: Update
2022-07-18 02:00:33 +00:00
github-actions[bot]
518fd64cef
flake.lock: Update
...
Flake lock file updates:
• Updated input 'nixpkgs':
'github:NixOS/nixpkgs/38860c9e91cb00f4d8cd19c7b4e36c45680c89b5' (2022-07-11)
→ 'github:NixOS/nixpkgs/8f485713f5e6b6883a9b6959afa98688360a3ecb' (2022-07-16)
2022-07-18 01:52:22 +00:00
Adam Joseph
c8c6203c2c
local-derivation-goal.cc: detect unprivileged_userns_clone failure mode
...
The workaround for "Some distros patch Linux" mentioned in
local-derivation-goal.cc will not help in the `--option
sandbox-fallback false` case. To provide the user more helpful
guidance on how to get the sandbox working, let's check to see if the
`/proc` node created by the aforementioned patch is present and
configured in a way that will cause us problems. If so, give the user
a suggestion for how to troubleshoot the problem.
2022-07-17 01:27:22 -07:00
Adam Joseph
6fc56318bf
local-derivation-goal.cc: add comment re: CLONE_NEWUSER
...
local-derivation-goal.cc contains a comment stating that "Some distros
patch Linux to not allow unprivileged user namespaces." Let's give a
pointer to a common version of this patch for those who want more
details about this failure mode.
2022-07-17 01:23:32 -07:00
Adam Joseph
8d35f387dc
local-derivation-goal.cc: warn if failing and /proc/self/ns/user missing
...
This commit causes nix to `warn()` if sandbox setup has failed and
`/proc/self/ns/user` does not exist. This is usually a sign that the
kernel was compiled without `CONFIG_USER_NS=y`, which is required for
sandboxing.
2022-07-16 19:37:27 -07:00
Adam Joseph
90830b1074
local-derivation-goal.cc: warn if failing due to max_user_namespaces==0
...
This commit uses `warn()` to notify the user if sandbox setup fails
with errno==EPERM and /proc/sys/user/max_user_namespaces is missing or
zero, since that is at least part of the reason why sandbox setup
failed.
Note that `echo -n 0 > /proc/sys/user/max_user_namespaces` or
equivalent at boot time has been the recommended mitigation for
several Linux LPE vulnerabilities over the past few years. Many users
have applied this mitigation and then forgotten that they have done
so.
2022-07-16 19:30:53 -07:00
Adam Joseph
8ea3a911aa
local-derivation-goal.cc: improve error messages when sandboxing fails
...
The failure modes for nix's sandboxing setup are pretty complicated.
When nix is unable to set up the sandbox, let's provide more detail
about what went wrong. Specifically:
* Make sure the error message includes the word "sandbox" so the user
knows that the failure was related to sandboxing.
* If `--option sandbox-fallback false` was provided, and removing it
would have allowed further attempts to make progress, let the user
know.
2022-07-16 14:56:24 -07:00
Alex Wied and Bernardo Meurer
b88fb50e21
fix(libstore): allow Nix to access all Rosetta 2 paths on MacOS
...
Fixes : #5884
2022-07-15 12:10:56 -07:00
John Ericson
12461e246b
Leverage existing docs for new store-path^outputs syntax
2022-07-15 14:04:22 +00:00
0e4ec98ae8
Fix typo in docs
...
Thanks!
Co-authored-by: Eelco Dolstra <edolstra@gmail.com >
2022-07-15 09:49:23 -04:00
John Ericson
279ecf7cde
Remove computed-derivations experimental feature
...
We don't need it yet.
2022-07-15 13:42:17 +00:00
Eelco Dolstra and GitHub
59764eb842
Merge pull request #6810 from jfly/jfly/do-not-assume-savedvars-exist
...
nix develop: do not assume that saved vars are set
2022-07-15 13:59:25 +02:00
Eelco Dolstra and GitHub
0621e99414
Merge pull request #6811 from edolstra/fix-auto-chroot
...
Disable auto-chroot if $NIX_STATE_DIR is set
2022-07-15 13:11:08 +02:00
Eelco Dolstra
3bcd7a5474
Disable auto-chroot if $NIX_STATE_DIR is set
...
Issue #6732 .
2022-07-15 12:32:29 +02:00
Jeremy Fleischman
04386f7d69
nix develop: do not assume that saved vars are set
...
This fixes https://github.com/NixOS/nix/issues/6809
2022-07-14 23:25:39 -07:00
Domen Kožar and GitHub
de287964d5
Merge pull request #6807 from NixOS/curl-patch
...
curl: patch for netrc regression in Nix
2022-07-14 19:30:14 -05:00
John Ericson
8735f55dec
Fix bug, test more, document more
2022-07-14 20:23:43 -04:00