Commit graph

6932 commits

Author SHA1 Message Date
Eelco Dolstra
f66108f738
nix-env: Create ~/.nix-profile automatically
(cherry picked from commit 9348f9291e5d9e4ba3c4347ea1b235640f54fd79)
2019-10-10 00:00:54 +02:00
Eelco Dolstra
2070d55b0b
Force per-user group to a known value
(cherry picked from commit 20eec802ff11dd2b152715cd5c81b756d318219d)
2019-10-09 23:58:59 +02:00
Eelco Dolstra
fe51fbaf81
Typo
(cherry picked from commit 9277e72cb0aac72100c01334fdf25ea79d19052e)
2019-10-09 23:58:55 +02:00
Eelco Dolstra
7c4589854b
Go back to 755 permission on per-user directories
700 is pointless since the store is world-readable anyway. And
per-user/root/channels must be world-readable.

(cherry picked from commit d7bae5680fc26303acb9a9ee1a202f537841a624)
2019-10-09 23:58:51 +02:00
Eelco Dolstra
1c10f739eb
nix-profile.sh: Remove coreutils dependency
(cherry picked from commit 61a6176acaa8522cbcf091a34a663ef45307fef7)
2019-10-09 23:57:41 +02:00
Eelco Dolstra
2522757e83
nix-profile.sh: Don't create .nix-channels
This is already done by the installer, so no need to do it again.

(cherry picked from commit 26762ceb8629af95300c0cc8c372a99282060dc1)
2019-10-09 23:57:35 +02:00
Eelco Dolstra
923b6bd83c
Remove some redundant initialization
(cherry picked from commit c43d9f6131102f2761f22b1ec26f345d357f169c)
2019-10-09 23:57:30 +02:00
Eelco Dolstra
65953789bc
Remove world-writability from per-user directories
'nix-daemon' now creates subdirectories for users when they first
connect.

Fixes #509 (CVE-2019-17365).
Should also fix #3127.

(cherry picked from commit 5a303093dcae1e5ce9212616ef18f2ca51020b0d)
2019-10-09 23:57:25 +02:00
Eelco Dolstra
910b0fcc11
Filter ANSI escape sequences in -L output
Otherwise, builds like NixOS VM tests may leave the terminal in a
weird state and do resets.

(cherry picked from commit 4331eeb13d241dfe2d2e6a01c53915c556cac94f)
2019-10-09 23:57:14 +02:00
Eelco Dolstra
e232bf2b69
Bump version number 2019-10-09 16:26:03 +02:00
Silvan Mosberger
7c9ad4d0d7
docs: Note that tryEval doesn't do deep evaluation
(cherry picked from commit e4ea3e03066a760c8cd462108af99aebaaa44c1b)
2019-10-09 16:25:42 +02:00
Eelco Dolstra
fa028194e9
Disable OpenSSL lock callback on OpenSSL >= 1.1.1
(cherry picked from commit a56b51a0ba7b0d6fdff7fd0127a118185b146f4f)
2019-10-09 16:25:23 +02:00
Julien Tanguy
ff7fcd3805
docs: Fix a typo in github in an example
(cherry picked from commit 92ede15dd902f7c1d2771c194b8bb73fe406840f)
2019-10-09 16:25:17 +02:00
Julien Tanguy
ceddbc921f
docs: Use the explicit ref for fetchGit with a tag
With the merge of #2582, the syntax "tags/1.9" for refs does not work
anymore.
However, the new syntax "refs/tags/1.9" seems to support annotated tags,
such as "refs/tags/2.0".

Closes #2385.

(cherry picked from commit ae244af242ca3621e5a3b9196f27d9fcbf297266)
2019-10-09 16:25:11 +02:00
Alexandre Esteves
62d1c60fb3
Move 'builtins.splitVersion' to position respecting alphabetical order
(cherry picked from commit 9533d85ce009c65722a2addc55b64ee51f15dea3)
2019-10-09 16:24:49 +02:00
zimbatm
f4106e76ff
libstore: don't forward --show-trace
(cherry picked from commit e63c9e73e3e5d1f31fa5065c9ff59f442dd07d0e)
2019-10-09 16:24:35 +02:00
Eelco Dolstra
f3ce4453a6
Don't catch exceptions by value
(cherry picked from commit 893be6f5e36abb58bbaa9c49055a5218114dd514)
(cherry picked from commit bd79c1f6f6391786772a8a79962abe22f374cca4)
2019-10-09 16:24:28 +02:00
Eelco Dolstra
9f53bc33e7
Shut up some warnings
(cherry picked from commit 99e8e58f2de9941353b47ed14fbe4ed76d635519)
(cherry picked from commit 3a022d45993b6fa8c7bf03517a3a3d1a2ab15f4a)
2019-10-09 16:24:23 +02:00
Joseph Lucas
4d83eb6206
Update garbage-collection.xml readability
1. remove a typo space
2. Simplify negative style by using affirmative style

(cherry picked from commit 10bfc5c0d09d5508e3dab4c32f3368caeb5f7f56)
2019-10-09 16:24:10 +02:00
Eelco Dolstra
3919093e9a
Fix fetchTarball with chroot stores
Fixes #2405.

(cherry picked from commit 168a8879165dd0deab1a93d343a6003146f37031)
2019-10-09 16:23:49 +02:00
Sam Doshi
b0ae8fe2db
nix search: remove verbose example
(cherry picked from commit 6f6cb5e3880d0c7a1dd2bc13c2e0be8ce0ae9fa1)
2019-10-09 16:23:39 +02:00
Danny Bautista
3c5788d094
Fix typos in the Nix Manual.
(cherry picked from commit 00a567588e43b51944a9b91c1e890bda27773aed)
2019-10-09 16:23:31 +02:00
Matthew Bauer
9f698c4530
Handle empty sandbox_shell
Previously, SANDBOX_SHELL was set to empty when unavailable. This
caused issues when actually generating the sandbox. Instead, just set
SANDBOX_SHELL when --with-sandbox-shell= is non-empty. Alternative
implementation to https://github.com/NixOS/nix/pull/3038.

(cherry picked from commit 199e888785bd23073e44e56f6c74b95dc7c10ffa)
2019-10-09 16:23:16 +02:00
Eelco Dolstra
1b78bbb414
nix search: Don't quietly ignore errors
(cherry picked from commit 7c74f075f4a7274ad38c90085cc269a19a977438)
2019-10-09 16:23:00 +02:00
Eelco Dolstra
1d5cb6ad48
getSourceExpr(): Handle channels
Fixes #1892.
Fixes #1865.
Fixes #3119.

(cherry picked from commit e6e61f0a54dac0174df996e93fcfedcac7769ab4)
2019-10-09 16:22:51 +02:00
Eelco Dolstra
22d4ea7a98
Tweak release notes 2019-09-04 16:00:03 +02:00
Eelco Dolstra
b774845af7
Set release date 2019-09-04 12:53:22 +02:00
Eelco Dolstra
5fad9d01c2
gc-auto.sh: Increase sleep time 2019-09-04 12:52:54 +02:00
Eelco Dolstra
08ee364950
gc-auto.sh: More test fixes 2019-09-03 18:11:43 +02:00
Eelco Dolstra
e07ec8d27e
Support allowSubstitutes attribute in structured attribute derivations
Hopefully fixes #3081 (didn't test).
2019-09-03 16:03:49 +02:00
Eelco Dolstra
cec50290bf
gc-auto.sh: Add some more instrumentation 2019-09-03 15:45:32 +02:00
Eelco Dolstra
f186000367
Add some noexcepts
This is to assert that callback functions should never throw (since
the context in which they're called may not be able to handle the
exception).
2019-09-03 13:45:35 +02:00
Eelco Dolstra
7348653ff4
Ensure that Callback is called only once
Also, make Callback movable but uncopyable.
2019-09-03 13:45:35 +02:00
Eelco Dolstra
8c4ea7a451
Downloader: Remove a possible double call to Callback 2019-09-03 13:45:32 +02:00
Eelco Dolstra
918717f3b5
Merge pull request #3066 from matthewbauer/wait4path
Use wait4path on org.nixos.nix-daemon.plist
2019-09-03 12:10:32 +02:00
Matthew Bauer
87c604c1f0 Fix launchd program args
launchd has some weird syntx. Apparently the program needs to be in
the ProgramArguments, as Program appears to be ignored.
2019-09-02 18:35:10 -04:00
Eelco Dolstra
84de821004
Merge pull request #3069 from matthewbauer/max-name
Set maximum name length in Nix
2019-08-29 15:22:36 +02:00
Eelco Dolstra
8478c99d09
Merge pull request #3048 from toonn/nix-env_doc
Fix nix-env documentation for --delete-generations
2019-08-29 15:22:01 +02:00
Eelco Dolstra
a2c4fcd5e9 Don't rely on st_blocks
It doesn't seem very reliable on ZFS.
2019-08-29 14:49:58 +02:00
toonn
5bdac86be2 Reword to clarify newer generations are left alone
My attempt at clarifying the docs resulted in a false explanation. This
is now fixed and I added an example to eliminate all possible confusion.
2019-08-29 13:56:21 +02:00
Eelco Dolstra
31f5ecfaa5 Maybe fix #3058 2019-08-29 12:35:15 +02:00
Eelco Dolstra
ecb0a23d51 Add some more instrumentation 2019-08-29 12:10:01 +02:00
Eelco Dolstra
f27e53f77e Cleanup 2019-08-29 12:09:58 +02:00
Eelco Dolstra
b6120d26a8
gc-auto.sh: Increase verbosity 2019-08-28 22:19:31 +02:00
Eelco Dolstra
c128031492
Fix macOS build
https://hydra.nixos.org/build/99500938
2019-08-28 22:04:45 +02:00
Eelco Dolstra
7ef2645f45
Merge pull request #2921 from matthewbauer/handle-sigwinch
Handle SIGWINCH in main thread
2019-08-28 21:48:14 +02:00
Matthew Bauer
693e68e09c Set maximum name length in Nix
Previously we allowed any length of name for Nix derivations. This is
bad because different file systems have different max lengths. To make
things predictable, I have picked a max. This was done by trying to
build this derivation:

  derivation {
    name = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
    builder = "/no-such-path";
    system = "x86_64-linux";
  }

Take off one a and it will not lead to file name too long. That ends
up being 212 a’s. An even smaller max could be picked if we want to
support more file systems.

Working backwards, this is why:

aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-${name}.drv.chroot

> 255 - 32 - 1 - 4 - 7 = 211
2019-08-28 12:32:54 -04:00
Eelco Dolstra
7298a38a07
Don't send certain setting overrides to the daemon
These are already handled separately. This fixes warnings like

  warning: ignoring the user-specified setting 'max-jobs', because it is a restricted setting and you are not a trusted user

when using the -j flag.
2019-08-28 16:29:44 +02:00
Eelco Dolstra
ad03159e25
Merge pull request #2745 from samueldr/install/detect-systemd-separately
install-multi-user: Detect and fail lack of systemd separately
2019-08-28 11:34:23 +02:00
Eelco Dolstra
bd285849ed
Merge pull request #3054 from matthewbauer/nix-dir-macos
Allow empty /nix directory in multi-user installer
2019-08-28 11:29:43 +02:00