1
0
Fork 0
mirror of https://github.com/NixOS/nix synced 2025-06-24 22:11:15 +02:00
Commit graph

1083 commits

Author SHA1 Message Date
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
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
Pol Dellaiera
5f71ebb956 fix: make sure directory exists before using ln 2024-10-31 16:25:18 +01:00
John Ericson
6594573f3d Remove dead code in the Meson build system
Identified in https://github.com/NixOS/nix/pull/11224#discussion_r1715056429

Co-Authored-By: Robert Hensing <robert@roberthensing.nl>
2024-10-09 11:07:15 -04:00
Noam Yorav-Raphael
97fffd8765 nix-profile.sh.in: fix envvar condition 2024-09-19 07:20:04 +03:00
Travis A. Everett
51a01aa6c5 sequoia-nixbld-user-migration: halt on error
Addressing user feedback about a case where actions the script takes
may fail without a specific permission if run over SSH.
2024-09-11 08:56:53 -05:00
Noam Yorav-Raphael
38bfbb297c
Use envvars NIX_CACHE_HOME, NIX_CONFIG_HOME, NIX_DATA_HOME, NIX_STATE_HOME if defined (#11351) 2024-09-11 10:36:46 +00:00
Travis A. Everett
f2e7e996da sequoia-nixbld-user-migration: disable trace mode
Was hoping to leave this enabled for a little while as core community
members test this script out, but Apple's aggressive release timeline
for macOS 15 Sequoia has caught us off-guard here.

It's probably not ideal for a general audience if the script spews all
of this output--and people can still force bash to run in trace mode
if we really need to debug a problem.
2024-09-10 20:54:09 -05:00
Travis A. Everett
ef3d3c5682 use existing GID in sequoia migration script
I hardcoded the wrong GID (30001 instead of 30000), but it's
better to just pick up the GID from the existing group.
2024-09-04 20:26:50 -05:00
tomberek
a6e6da3b0c
Merge pull request #10919 from abathur/macos_sequoia_fixes
install-darwin: fix _nixbld uids for macOS sequoia
2024-09-03 19:55:55 -04:00
John Ericson
c7ec33605e Meson misc things
Meson-ify a few things, scripts, completions, etc. Should make our Meson
build complete except for docs.

Co-Authored-By: Qyriad <qyriad@qyriad.me>
Co-Authored-By: eldritch horrors <pennae@lix.systems>
2024-08-27 10:19:55 -04:00
Emily
11cf29b15c
install-darwin: increment base UID by 1 (#15) 2024-08-26 11:59:58 -05:00
tomberek
3b6e24f66c
Merge pull request #11346 from mjgallag/nix-profile-daemon-set-u
nix-daemon.sh profile script: operate under `set -u` in bash
2024-08-26 10:49:31 -04:00
Emily
93a8b06070 sequoia-nixbld-user-migration: increment base UID by 1 2024-08-26 05:27:10 +01:00
Travis A. Everett
75567423fb install-darwin: move nixbld gid to match first UID 2024-08-20 09:20:24 -05:00
Travis A. Everett
df36ff0d1e 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.
2024-08-20 09:20:24 -05:00
tomberek
6accf86923
Merge pull request #11075 from abathur/macos_sequoia_proto_migration_script
add UID migration script for macOS Sequoia 15
2024-08-19 23:58:48 -04:00
Michael Gallagher
30af4a9e27
nix-daemon.sh profile script: operate under set -u in bash
see d459d3307c
2024-08-15 17:56:05 -07:00