1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-25 02:21:16 +02:00
Commit graph

1045 commits

Author SHA1 Message Date
Thomas Miedema
8d99b6578a 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.

(cherry picked from commit 2b4e3fa144)
2025-04-01 06:47:25 +00:00
Robert Hensing
2f1b70a529 Format .nix files
This does not include any automation for the release branch, but
is based on the configuration of https://github.com/NixOS/nix/pull/12349

    pre-commit run -a nixfmt-rfc-style
2025-01-24 20:30:07 +01:00
Travis A. Everett
0cefe354c8 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.

(cherry picked from commit 6a874c2865)

# Conflicts:
#	scripts/sequoia-nixbld-user-migration.sh
2025-01-16 16:43:56 +00:00
mergify[bot]
c803fe0785
Merge pull request #12197 from NixOS/mergify/bp/2.24-maintenance/pr-11541
nix-profile.sh.in: fix envvar condition (backport #11541)
2025-01-12 13:09:04 +00:00
Robert Hensing
a69d32d194 Resolve conflict
Some of the code before https://github.com/NixOS/nix/pull/11351 did not
have the problem. What remains wasn't all that problematic, but is good
to have anyway.
2025-01-12 13:15:03 +01:00
Noam Yorav-Raphael
971748ace9 nix-profile.sh.in: fix envvar condition
(cherry picked from commit 97fffd8765)

# Conflicts:
#	scripts/nix-profile.sh.in
2025-01-10 10:20:46 +00:00
Graham Christensen
56332fda1c 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.

(cherry picked from commit 4137ead7a1)
2025-01-10 09:56:35 +00:00
Jörg Thalheim
2fbd0a943c 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.

(cherry picked from commit 6162e1220e)
2025-01-07 00:04:32 +01:00
Jörg Thalheim
7bafbfd50e binary-tarball: create tarball without listing files
This is producing quite a bit of log output in CI.

(cherry picked from commit 31b3a34e5b)
2024-12-14 15:24:48 +00:00
Jörg Thalheim
578f185daf 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.

(cherry picked from commit 691b1ea237)
2024-12-14 15:24:48 +00:00
Pol Dellaiera
2a2d484986 fix: make sure directory exists before using ln
(cherry picked from commit 5f71ebb956)
2024-11-01 10:19:42 +00:00
Emily
8d0414d682 install-darwin: increment base UID by 1 (#15)
(cherry picked from commit 11cf29b15c)
2024-09-03 23:59:16 +00:00
Travis A. Everett
c5a0e624d9 install-darwin: move nixbld gid to match first UID
(cherry picked from commit 75567423fb)
2024-09-03 23:59:15 +00:00
Travis A. Everett
0679505d8c install-darwin: fix _nixbld uids for macOS sequoia
Starting in macOS 15 Sequoia, macOS daemon UIDs are encroaching on our
default UIDs of 301-332. This commit relocates our range up to avoid
clashing with the current UIDs of 301-304 and buy us a little time
while still leaving headroom for people installing more than 32 users.

(cherry picked from commit df36ff0d1e)
2024-09-03 23:59:15 +00:00
Eelco Dolstra
f343364918 Merge remote-tracking branch 'origin/master' into flake-regressions 2024-07-22 16:03:45 +02:00
Eelco Dolstra
ab0b54b905 Remove the Hydra status check workflow
I'm sick of receiving an email about this every 30 minutes.
2024-07-08 14:39:33 +02:00
Eelco Dolstra
6f3d2daee6 Fix spellcheck 2024-06-21 15:37:08 +02:00
Eelco Dolstra
0eec60968a flake-regressions.sh: Make the sort order deterministic 2024-06-21 15:37:08 +02:00
Eelco Dolstra
36cc8d5f4b Run the flake-regressions test suite 2024-06-21 15:37:08 +02:00
Hamir Mahal
03883f0d1d
fix: copy in install-multi-user.sh (#10902) 2024-06-13 21:13:21 +00:00
Eelco Dolstra
1450b553fa
Merge pull request #10806 from jdek/riscv64_install
scripts/install.in: add riscv64 support to installer
2024-06-03 15:42:13 +02:00
Robert Hensing
de5050f73b
Merge pull request #9590 from wh0/patch-1
nix-profile: fix both profile links detection
2024-06-03 14:37:08 +02:00
J. Dekker
0ed356f3c0 scripts/install.in: add riscv64 support to installer
The artifacts are already built and hosted, the install script just needs to be taught about riscv64.

Signed-off-by: J. Dekker <jdek@itanimul.li>
2024-05-30 15:03:20 +02:00
John Ericson
567265ae67 Start getting all shell scripts passing shellcheck
Like with the formatter, we are blacklisting most files by default.

Do a few files to get us started, and get a sense of what this looks
like.
2024-05-27 22:39:56 -04:00
ramboman
b4950404ba
Honor the same set of proxy environment variables (#10611)
Different parts of the project honor different sets of proxy environment
variables. With this commit all parts of the project will honor the same
set of proxy environment variables.

---------

Co-authored-by: Your Name <you@example.com>
Co-authored-by: John Ericson <John.Ericson@Obsidian.Systems>
2024-05-06 15:39:22 -04:00
Andrew Davis
a2a633d332
Prevent nix-daemon.sh from leaking variable into user environment
The script at `/nix/store/...-nix-2.21.0/etc/profile.d/nix-daemon.sh`  was leaving behind a variable, which was visible in the user's shell environment, but not used outside the script.
2024-04-06 10:26:29 -04:00
Jesse Schalken
c448636f7c
Fix loop over $NIX_PROFILES in nix-profile-daemon.fish.in 2024-03-20 15:23:31 +11:00
Théophane Hufschmitt
f175b3a4b7 Revert "install-multi-user.sh: _sudo: add proxy variables to sudo"
This reverts commit 24fd7e2755.
2024-03-07 10:06:33 +01:00
Théophane Hufschmitt
739f53aca4 Revert "Fix sudo in the darwin installer (#10128)"
This reverts commit 686405ef41.
2024-03-07 10:06:33 +01:00
Théophane Hufschmitt
686405ef41
Fix sudo in the darwin installer (#10128) 2024-03-06 22:36:37 +01:00
ramboman
24fd7e2755
install-multi-user.sh: _sudo: add proxy variables to sudo 2024-02-24 01:00:13 +00:00
Travis A. Everett
64a076fe06 install-darwin: fix symbolic perms for install cmd
The symbolic form in use here doesn't seem to have an effect
in either the BSD or coreutils install commands, leaving the
daemon plist with empty permissions. This seems to cause its
own problems.

I think I've got the right symbolic syntax now :)
2024-02-13 01:18:08 -06:00
w
29eb4d354a nix-profile: add cross reference to installer test 2023-12-29 07:14:53 +00:00
wh0
5d0bdb1d3f nix-profile: fix both profile links detection 2023-12-29 05:43:22 +00:00
Mel Zuser
fa4bbe53e8 installer: allow overriding of NIX_FIRST_BUILD_ID on darwin
because there are often already users in the 300 range and it's painful
to work around.

revives #6466
2023-12-18 15:02:26 -08:00
John Ericson
19573f1b05 Restore comment 2023-12-13 15:33:15 -05:00
John Ericson
ff992f8b46 Merge remote-tracking branch 'upstream/master' into package-nix 2023-12-11 15:26:12 -05:00
John Ericson
77003a4f0c Factor out the installer script 2023-12-03 18:29:15 -05:00
John Ericson
e275f0adfb Move binary-tarball.nix to scripts dir 2023-12-03 18:16:07 -05:00
Felix Uhl
64827360be Fix "unbound variable" errors in bash
Fixes #9414
2023-11-21 14:49:48 +01:00
Felix Uhl
1362a0a55a Fix logic for default XDG_DATA_DIRS value
The [POSIX test manpage](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html)
as well as the [fish test manpage](https://fishshell.com/docs/current/cmds/test.html#operators-for-text-strings)
specify that `-z` will be "True if the length of string string is zero;
otherwise, false."

The `-n` was likely a mixup and not caught during testing of
https://github.com/NixOS/nix/pull/8985 due to a lack of missing
conflicting entries in `XDG_DATA_DIRS`.
2023-11-07 03:41:19 +01:00
Ana Hobden
150b5aba50 Update scripts/nix-profile-daemon.fish.in
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-11-06 20:43:27 +01:00
Ana Hobden
896013ec0c Fix bad copy-paste 2023-11-06 20:43:27 +01:00
Ana Hobden
867f894289 Populate $XDG_DATA_DIRS with appropriate folder from Nix profile
On non-NixOS systems, the default `nix` install does not populate the
`$XDG_DATA_DIRS`. This populates it and enables things like bash-completion
and `.desktop` file detection for `nix` profile installed packages.

Signed-off-by: Ana Hobden <operator@hoverbear.org>
2023-11-06 20:43:27 +01:00
Théophane Hufschmitt
e304e8d053
Merge pull request #7593 from miallo/ignore-identical-rc-backup-files-for-installation
install-multi-user: ignore profile_target backups that have no change
2023-09-25 14:14:53 +02:00
John Ericson
e672d52f7c
Merge pull request #8512 from scarf005/install-show-uid
build: show UID and GID in welcome message
2023-06-15 13:49:44 +02:00
scarf
80451b762d
style: use plurals in uid ranges
Co-authored-by: John Ericson <git@JohnEricson.me>
2023-06-15 14:47:18 +09:00
scarf
4b487317c3
style: use mathematical interval notation 2023-06-15 08:52:34 +09:00
Domen Kožar
c73daea61e darwin installer: remove the file before installing new one
Otherwise results into:

cp: /Library/LaunchDaemons/org.nixos.nix-daemon.plist and /nix/var/nix/profiles/default/Library/LaunchDaemons/org.nixos.nix-daemon.plist are identical (not copied).
2023-06-14 12:28:01 -04:00
scarf
bfb5e0bdcd
build: show UID and GID in welcome message 2023-06-14 19:06:04 +09:00