1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-08 19:46:02 +01:00
Commit graph

1099 commits

Author SHA1 Message Date
Jörg Thalheim
3076cc9e84
Merge branch 'master' into fzakaria/shellcheck-systemd-multi-user 2025-09-25 07:40:27 +02:00
Farid Zakaria
98f716f78c Revert change for SC2059 for nix_user_for_core 2025-09-24 19:13:46 -07:00
Farid Zakaria
76b9565414 shellcheck fix scipts/install-systemd-multi-user.sh 2025-09-24 18:52:46 -07:00
Farid Zakaria
c77b15a178 shellcheck fix scripts/install-multi-user.sh 2025-09-24 18:49:53 -07:00
Jean-François Roche
a408bc3e30 installer: prepend nix paths to shell config files instead of appending
Some distribution will stop evaluating the shell config file if
they are not running in an interactive shell. As we append the nix
paths to the end of the file, they will not be evaluated.

We better prepend the nix paths to the shell config files to be sure
that once nix is installed, nix path will be available in any shell.

Note that this is already the case for the detsys installer script for
a while: https://github.com/DeterminateSystems/nix-installer/pull/148

Possibly related errors:

https://github.com/NixOS/nix/issues/8061
https://github.com/NixOS/nix/pull/6628
https://github.com/NixOS/nix/issues/2587
2025-09-19 14:06:06 +02:00
Jörg Thalheim
11d03893f8 add freebsd multi-user installer 2025-08-08 09:10:35 +02:00
Jörg Thalheim
ddd3034909 single-user-install: fix cp flags on freebsd 2025-08-07 23:51:37 +02:00
Jörg Thalheim
1cce358c40 single-user-install: just call uname once 2025-08-07 23:51:37 +02:00
Sergei Zimmerman
385e2c3542
meson: Apply formatting universally
Now that we have applied the [1] patch, the diff is much
nicer and less noisy.

[1]: https://www.github.com/mesonbuild/meson/pull/14861
2025-08-07 02:58:29 +03:00
Sergei Zimmerman
413f782176
ci: Run sanitizer tests in a separate job
This should speed up the CI somewhat by parallelizing
the work across the matrix of configurations.
2025-07-28 23:37:04 +03:00
Robert Hensing
b7782809cb docs, messages: Resolve nixos.org/manual/nix/stable redirect
Loads a bit quicker
2025-07-25 10:18:13 +02:00
Sergei Zimmerman
c6d0d33e4d ci: Simplify installer tests 2025-07-23 21:52:23 +02:00
John Soo
87299e466d installers, tests: remove --preserve=mode from cp invocations
-p preserves xattrs and acls which can be incompatible between
filesystems

Unfortunately keep -p on darwin because the bsd coreutils do not
support --preserve.

Fixes #13426
2025-07-07 15:34:18 -06:00
Jörg Thalheim
247f166f87
Merge pull request #13245 from stefanboca/sb/push-yoorqzwsxmzn
nix-profile{,-daemon}.fish: check for profile in XDG_DATA_HOME
2025-05-26 00:14:40 +02:00
Stefan Boca
751f50f4ad nix-profile{,-daemon}.fish: check for profile in XDG_DATA_HOME
...and also NIX_STATE_HOME in nix-profile.fish. This is directly
translated from the bash scripts and makes the fish scripts equivalent
in functionality to the bash scripts.

Note that nix-profile.fish checks for NIX_STATE_HOME and
nix-profile-daemon.fish does not, so the two scripts are no longer
identical.
2025-05-25 17:15:32 +02:00
Stefan Boca
b9ed3ae36e
nix-profile{,-daemon}.fish: fix do not source twice
Commit b36637c8f7 set
`__ETC_PROFILE_NIX_SOURCED` globally, but this is not enough to prevent
the script from being run again by child shells, because the
variable was not exported and thus not inherited by any child process.
Exporting the variable also agrees with the bash scripts.

Notably, the old behavior broke `nix develop -c fish` in some cases,
because the profile bin directory got prepended to the path, causing
binaries from the profile to override binareis from the devshell.
2025-05-21 11:29:47 -07:00
Stefan Boca
f627b8c721
nix-profile{,-daemon}.fish: format with fish_indent 2025-05-20 22:11:39 -07:00
Jörg Thalheim
f683a555bf
Merge pull request #12423 from ilya-bobyr/fish-profile-local-state-bin-in-PATH
nix-profile.fish: Add local state bin to $PATH
2025-04-18 07:27:04 +02:00
Jörg Thalheim
6dcbac4278
Merge pull request #13040 from ilya-bobyr/fish-profile-set-MANPATH
nix-profile-daemon.fish: Set MANPATH
2025-04-17 10:24:19 +02:00
Illia Bobyr
66ae8f4f44
nix-profile.fish: Do not check $USER
While it seems unlikely that `$USER` will be unset while `$HOME` is set,
as `$USER` is not used in the script and as `nix-profile-daemon.fish` is
not checking `$USER`, it seems better to remove this check.

`nix-profile.fish` and `nix-profile-daemon.fish` now become identical.
2025-04-16 17:16:51 -07:00
Illia Bobyr
470c521bcc
nix-profile-daemon.fish: Set MANPATH
There seems to be no good reason for `nix-profile.fish` to set
`$MANPATH` while it being unset when `nix-profile-daemon.fish` is used.
2025-04-16 17:14:47 -07:00
Illia Bobyr
fc8c11be48
nix-profile.fish: Add local state dir bin to $PATH
It seems reasonable to add both `$HOME/.profile/bin` and
`@localstatedir@/nix/profiles/default/bin` to `$PATH` for both user
local and daemon based nix execution.  Nix daemon execution mode does
not affect these path.
2025-04-16 17:11:56 -07:00
Thomas Miedema
2b4e3fa144 nix-daemon: source nix-profile-daemon.sh only once
On my system (Ubuntu 24.04 with nix installed using
https://zero-to-nix.com/), I noticed that my PATH
contained multiple times the following entries:

  /home/thomas/.nix-profile/bin
  /nix/var/nix/profiles/default/bin

Fix it by inserting a missing `export`, to make
sure `nix-daemon.sh` is really only executed once.
2025-03-29 20:23:16 +01:00
Illia Bobyr
23f07fa974
nix-profile.fish: Look for ca-bundle.crt in $NIX_PROFILES
There seems to be no good reason for `nix-profile.fish` and
`nix-profile-daemon.fish` to differ in how they look for the location of
the `ca-bundle.crt` that might be installed by one of the packages.

As `$NIX_PROFILES` points to user local paths, not checking there is
strictly less useful, it seems?
2025-02-05 01:42:21 -08:00
Illia Bobyr
50300772e4
nix-profile.fish: set --local NIX_LINK
Using `set --local` is better than using `set`/`set --erase`.  `--local`
will preserve any existing `NIX_LINK` value.  And the local variable is
automatically removed for any execution path.
2025-02-04 16:01:29 -08:00
Illia Bobyr
85aa624126
nix-profile-daemon.fish: XDG_DATA_DIRS: .profile/share
It seems reasonable to add the `share` folder from the user profile into
`$XDG_DATA_DIRS` both for daemon and profile execution.  Nix could add
package shared files into this folder regardless of how the nix daemon
itself is running.
2025-02-03 16:24:14 -08:00
Illia Bobyr
803fb83f7f
nix-profile.fish: Typo NIX_SS{H => L}_CERT_FILE 2025-02-02 22:51:47 -08:00
mergify[bot]
63c0ea5702
Merge pull request #12252 from ilya-bobyr/fish-profile-source-once-and-fmt
nix-profile{,-daemon}.fish: Do not source twice, fmt
2025-02-02 03:11:23 +00:00
Illia Bobyr
b36637c8f7
nix-profile{,-daemon}.fish: Do not source twice
In order for the script not be sourced multiple times by the same shell
instance, `__ETC_PROFILE_NIX_SOURCED` needs to be set with a `--global`
flag.

Both files are almost identical.  And style differences make it harder
to see what is actually different and keep them in sync, when it is
required.
2025-01-18 12:39:10 -08:00
Illia Bobyr
666d656593
nix-profile-daemon.fish: fmt
`nix-profile.fish` and part of `nix-profile-daemon.fish` use 4 space
indentation.  Which is also the indentation that the fish shell
documentation is using.

Reformatting a chunk of `nix-profile-daemon.fish` from 2 space
indentation to 4 space indentation for consistency.
2025-01-18 12:39:10 -08:00
John Ericson
69fde530a6 Clean up packaging a bit
- Multiple choices of stdenv are handled more consistently, especially for the dev
  shells which were previously not done correctly.

- Some stray nix code was moving into the `packaging` directory
2025-01-17 15:09:43 -05:00
Travis A. Everett
6a874c2865 sequoia-nixbld-user-migration: nail down PATH
Fixes a user report of trouble with toybox grep and avoids
potential of same basic issue with other utils.
2025-01-15 08:59:14 -06:00
Siddarth Kumar
fd053fdcad
scripts/install-multi-user: fix typo 2025-01-13 14:12:41 +05:30
Jörg Thalheim
ed4f2c3204 scripts/install-darwin-multi-user: workaround dscl failing sometimes 2025-01-08 18:03:50 +01:00
Jörg Thalheim
6162e1220e installer: make sure we can always test the installer in ci and locally
Just now there is a dependency on cachix, which means we cannot test
the installer in CI if forks do not have the necessary secrets set up.
We replace this with a simple http server that serves the installer and
can be both used in CI and locally.
2024-12-15 18:17:15 +01:00
mergify[bot]
9389b27fe4
Merge pull request #12050 from Mic92/ci
speed up ci by splitting off eval and build + fix ci with restricted namespaces
2024-12-14 15:24:39 +00:00
Jörg Thalheim
31b3a34e5b binary-tarball: create tarball without listing files
This is producing quite a bit of log output in CI.
2024-12-14 12:07:35 +01:00
Jörg Thalheim
691b1ea237 speed up ci by splitting off eval and build
- This speeds up macOS builds from 30 minutes to 11 minutes (3x faster).
- Also improve error reporting e.g. printing out what actually failed to build.
- As a result we also no longer need swap.
2024-12-14 12:07:35 +01:00
mergify[bot]
9cf1b0cb57
Merge pull request #11761 from abitrolly/alt-sudo
install: Allow to specify alternative `sudo` command
2024-12-12 02:07:56 +00:00
Jörg Thalheim
8c25eac7a3
Merge pull request #12031 from DeterminateSystems/fixup-mode-typos
Install .nix-channels and nix.conf with 644 instead of 664
2024-12-10 05:39:22 +01:00
Cole Helbling
8768239517 Install .nix-channels and nix.conf with 644 instead of 664
As far as I can tell, there's no real reason either of these need to
be 664. I'm willing to bet they were just a typo that has lasted for
7 years. While this shouldn't change anything, this is, IMHO, more
correct, so let's stop perpetuating the wrong mode!
2024-12-09 11:15:53 -08:00
Graham Christensen
4137ead7a1
Disable suid and atime on the /nix mount point on Darwin
The Determinate Nix Installer has set nosuid and noatime in https://github.com/DeterminateSystems/nix-installer/pull/1338, and figured this perf and security improvement is worthy of upstreaming.

The /nix volume shouldn't have setuid binaries anyway, and filesystems seem to generally be noatime on macOS.
Further, the garbage collector doesn't use atime.
2024-12-05 14:01:00 -05:00
Anatoli Babenia
e83481f5a8 Allow sudo alternatives when installing from tarball 2024-12-01 14:36:58 +03:00
Anatoli Babenia
04975f7c32 install: Allow to specify alternative sudo command 2024-11-30 10:07:29 +03:00
Anatoli Babenia
37fd80588f shellcheck: simplify install-nix-from-tarball.sh 2024-11-27 17:11:36 +03:00
Anatoli Babenia
4145d18435 Rename install-nix-from-closure.sh into install-nix-from-tarball.sh
Because it is only used as /install script from tarball.
2024-11-24 22:29:17 +01:00
Eelco Dolstra
f29e7867a9 Revert "Merge pull request #11826 from DeterminateSystems/revert-11804"
This reverts commit aeffdeffc8, reversing
changes made to 723fdeb4f1.
2024-11-11 15:21:34 +01:00
Eelco Dolstra
67d231c046 Revert "Merge pull request #11804 from obsidiansystems/remove-old-make"
This reverts commit 619eeb658a, reversing
changes made to 1af94bf471.
2024-11-07 13:46:37 +01:00
John Ericson
e70c9bb06a Remove old build system 2024-11-06 16:09:18 -05:00
Eelco Dolstra
c29808929f Move scripts/flake-regressions.sh into the flake-regressions repo
It already contained a script "eval-all.sh" that did almost the same thing.
2024-11-06 17:09:11 +01:00