Commit Graph

38 Commits

Author SHA1 Message Date
tomberek
35c27ce261
Merge branch '2.19-maintenance' into mergify/bp/2.19-maintenance/pr-10919 2024-09-10 23:41:18 -04:00
Mel Zuser
ec2d9a3328 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

(cherry picked from commit fa4bbe53e8)
2024-09-11 01:35:11 +00:00
Emily
5e73cb895e install-darwin: increment base UID by 1 (#15)
(cherry picked from commit 11cf29b15c)
2024-09-03 23:57:08 +00:00
Travis A. Everett
18bac98815 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)

# Conflicts:
#	scripts/install-darwin-multi-user.sh
2024-09-03 23:57:07 +00: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
Josh Soref
4d4f2d10e7
darwin-install: fix shell hint 2022-08-23 19:38:53 -04:00
Travis A. Everett
3bf7a868ee darwin-install: nail down diskutil
Same purpose as de9efa3b79af7886fcf2a67b6ce97d4f96a57421

For some unclear reason, we get occasional reports from people who do
not have /usr/sbin on their PATH that the installer fails. It's a
standard part of the PATH, so I have no clue what they're doing to
remove it--but it's also fairly cheap to avoid.
2021-12-01 18:38:32 -06:00
Travis A. Everett
8a3b8d0b33 darwin-install: fix incorrect fn name 2021-10-12 18:17:27 -05:00
Travis A. Everett
033081aec2 fix install on macOS monterey 2021-09-21 13:38:29 -05:00
Matthew Bauer
079bde2aef Try setting enableOwnership in macOS install
For external hard disks where ownership is not enabled by default.
2021-08-24 19:23:18 -05:00
Travis A. Everett
eab14a642c darwin: encrypt nix volume if filevault is enabled 2021-04-29 13:26:51 -05:00
Travis A. Everett
0431cf6d09 fix nixbld user name/uid for macOS 2021-03-11 10:16:34 -06:00
Travis A. Everett
b719f686a8 fix skipped multi-user install steps on macOS
Some of the changes in #3788 to support non-systemd Nix installs
don't appear to be aware that the darwin installer exists, which
resulted in some skipped steps and inappropriate instructions.
2020-10-19 12:25:52 -05:00
Matthew Bauer
0847f2f1b3 Copy instead of linking launch agent
On Catalina, the /nix filesystem might not be mounted at start time.
To avoid this service not starting, we need to keep the launch agent
outside of the Nix store. A wait4pid will hold for our /nix dir to be
mounted.

Fixes #3125.
2019-10-08 21:52:17 -04:00
Graham Christensen
2921165a9d
Expand the multi-user installer to support Linuxes with systemd
- darwin installer: delete hardware report, not necessary
 - moves os-specific code from the darwin installer to to `poly_*`
   functions
 - adds profile.d support to the profile targets, which automatically
   handles many distros which don't have a /etc/bashrc but do have an
   /etc/profile.d
 - /bin/bash -> /usr/bin/env bash
 - document why each excluded shellcheck check is excluded
 - rename the multi-user to Daemon-based
2018-03-29 15:38:01 -04:00
Eelco Dolstra
f471aacff2
Merge pull request #1775 from LnL7/darwin-build-users
installer: create 'enough' build users
2018-02-13 12:31:53 +01:00
Giorgio Gallo
9f9393df55 solves #1582 2018-01-29 21:33:17 +01:00
Peter Stuart
a65376b01d
Remove extra space. 2018-01-12 14:27:29 -05:00
Daiderd Jordan
d15826164c
installer: create 'enough' build users 2018-01-03 22:34:34 +01:00
Daiderd Jordan
27788f4060
installer: don't touch /etc/profile
The default profile already loads /etc/bashrc.
2018-01-03 22:29:54 +01:00
Frederik Rietdijk
af1e2ffca1 Fix escaping, fixes build 2017-12-20 13:24:39 +01:00
Graham Christensen
1db034364a
replace lolcat with nix-info 2017-12-08 07:19:32 -05:00
Graham Christensen
be79d1f189
darwin installer: fix on High Sierra 2017-12-08 07:19:26 -05:00
Eelco Dolstra
ea94a87493
install-darwin-multi-user.sh: Remove superfluous nix.conf settings 2017-11-20 17:32:34 +01:00
Eelco Dolstra
73252aef18 Merge pull request #1591 from shlevy/darwin-installer-no-sudo-i
darwin installer: Fix on systems where sudo -i is disabled.
2017-10-12 13:08:15 +02:00
Shea Levy
fb98e29067 darwin installer: Fix on systems where sudo -i is disabled. 2017-10-05 09:07:55 -07:00
Anthony Cowley
92f9d18aa0 install-darwin-multi-user: relax assumption check
The installer will error out if a user's shell configuration includes any mention of ~nix-profile~, even if this is in a comment. This change is designed to do the bare minimum to ignore lines beginning with a `#`.
2017-10-02 20:07:56 -04:00
Eelco Dolstra
c2154d4c84
Rename a few configuration options
In particular, drop the "build-" and "gc-" prefixes which are
pointless. So now you can say

  nix build --no-sandbox

instead of

  nix build --no-build-use-sandbox
2017-08-31 14:28:25 +02:00
Graham Christensen
e0d39c8dc4
Rename PINCH_ME_IM_SILLY to ALLOW_PREEXISTING_INSTALLATION 2017-07-14 12:11:33 -04:00
Graham Christensen
12f6bb33d2
If there is no TTY, also skip verbose sudo messages 2017-07-14 12:11:30 -04:00
Graham Christensen
ce2281e6d8
Ensure PINCH_ME_IM_SILLY allows a /nix/store to stick around between builds
Also output in the status report that the user is very silly
2017-07-14 12:11:26 -04:00
Graham Christensen
1c7ce2a018
Assume yes if we have no TTY
Starve the TTY of input to ensure this works, but provide yes to the
current installer to handle the current broken case.
2017-07-14 12:11:23 -04:00
Graham Christensen
657b47e1b3
Address feedback around printf & exec 2017-07-14 12:11:00 -04:00
Graham Christensen
6a4037ca05
Don't install a second nix after the initial installation, and the rsync change fixes a bug hidden by the nix replacement where the store files were being owned by the installing user due to rsync's -a implying -og. 2017-07-14 12:10:57 -04:00
Graham Christensen
092f447c6d
Clean up issues around uninstall directions, and only show
relevant directions
2017-07-14 12:10:54 -04:00
Graham Christensen
6f639943c2
Prompt for sudo before validating assumptions, and check ourselves for root-owned files instead of making a scary warning. 2017-07-14 12:10:51 -04:00
Graham Christensen
2b5ab03524
multi-user install: move the profile in to the nix etc/profiles.d output 2017-07-14 12:10:47 -04:00
Graham Christensen
fb40d73e23
Switch to a fancy multi-user installer on Darwin 2017-07-14 12:10:44 -04:00