aboutsummaryrefslogtreecommitdiff
path: root/scripts
AgeCommit message (Collapse)Author
2022-08-23darwin-install: fix shell hintJosh Soref
2022-08-19install: only create TMPDIR if missingTravis A. Everett
2022-08-17Ensure that $TMPDIR exists if definedEelco Dolstra
2022-08-17Use plain mktempEelco Dolstra
This fixes the case where $TMPDIR doesn't end in a slash.
2022-08-12Merge pull request #6882 from DeterminateSystems/allow-multi-user-as-rootEelco Dolstra
Allow installing multi-user as root on macOS and Linux
2022-08-10Don't prompt about using sudo if we're already rootGraham Christensen
2022-08-10install-multi-user: abstract is_root, is_os_linux, is_os_darwinGraham Christensen
2022-08-08Only fail if selinux is in enforcingTom Franklin
2022-07-12Fix --no-daemon installationEelco Dolstra
It was accidentally triggering the auto-chroot code path because /nix/var/nix didn't exist. Fixes #6790.
2022-06-10install-multi-user: check if selinux is enabled and if it is then abortArtturin
2022-06-01darwin-install: work around existing vim swapfilesTravis A. Everett
User on Matrix reported install problems which presented as "vifs:editing error" which we traced back to vim griping about an existing swap file. When opened interactively, it did this: E325: ATTENTION Found a swap file by the name "/etc/.fstab.swp" owned by: root dated: Sön Apr 24 16:54:10 2022 file name: /private/etc/fstab modified: YES user name: root host name: MBP.local process ID: 1698 While opening file "/etc/fstab" dated: Sön Apr 24 16:56:27 2022 NEWER than swap file! ...
2022-05-04darwin-install: fix break from bad vimrcTravis A. Everett
It looks like the `--noplugin` flag added in #5489 wasn't enough to skirt this class of vim-init error, so this is swing 2 at a full fix. Fixes #6462.
2022-04-08installer: ask for confirmation on multi-user install without systemdMartin Schwaighofer
On Linux a user can go through all the way through the multi-user install and find out at the end that they now have to manually configure their init system to launch the nix daemon. I suspect that for a significant number of users this is not what they wanted. They might prefer a single-user install. Now they have to manually uninstall nix before they can go through the single-user install. This introduces a confirmation dialog before the install in that specific situation to make sure that they want to proceed. See also: https://github.com/NixOS/nix/issues/4999#issuecomment-1064188080 This closes #4999 but rejecting it and closing that issue anyways would also be valid.
2022-04-06curl: Use --fail to catch errorsEelco Dolstra
2022-03-31scripts/install-systemd-multi-user.sh: fix another typoArtturin
2022-03-26scripts/install-systemd-multi-user.sh: fix typoArtturin
sytemd-tmpfiles -> systemd-tmpfiles
2022-03-24Merge pull request #6285 from flokli/add-tmpfileEelco Dolstra
nix-daemon.conf.in: add tmpfiles file to create nix/daemon-socket directory
2022-03-24install-multi-user.sh: Preserve symlinksEelco Dolstra
We need to pass -P to ensure that symlinks are copied correctly. Fixes #6303.
2022-03-23scripts/install-systemd-multi-user.sh: install ↵Florian Klink
/etc/tmpfiles.d/nix-daemon.conf, too While `create_directories()` from install-multi-user.sh seems to already create parts of the directory structure, it's marked as deprecated, and it won't hurt also copying over the tmpfiles config and have it execute once.
2022-03-01installer: allow overriding nix user GID and UIDsBjørn Forsman
Needed to resolve conflict in case the default GID and UIDs are in use.
2022-02-28Merge pull request #6123 from abathur/fix_6122Domen Kožar
install-darwin: fix mount permission edge-case
2022-02-22install-darwin: track mount permission edge-case fixTravis A. Everett
Same as 1fd127a06833c19a5a2965bd41cf4f695773cca6, but applied to a code path (volume_pass_works -> verify_volume_pass) that the reporting user didn't hit and wasn't able to trigger manually. I am not certain but I suspect it will be easier to add prophylactically than to debug if its absence causes trouble some day.
2022-02-21Merge pull request #6138 from nmattia/nm-clarify-manpathEelco Dolstra
Document usage of MANPATH in nix-profile.sh
2022-02-21Document usage of MANPATH in nix-profile.shNicolas Mattia
While trying to figure out how `nix-env`/`nix profile` work I had a hard time understand how man pages were being installed. Took me quite some time to figure this out, thought it might be useful to others too!
2022-02-18install-darwin: fix mount permission edge-caseTravis A. Everett
Fixes #6122, which reports a problem with trying to run the installer under another user (probably: user is not the disk "owner" and thus can't mount the volume).
2022-02-17Create to daemon-socket folder during installGuillaume Maudoux
2022-02-10check-hydra-status.sh: Ignore unfinished buildsEelco Dolstra
2022-02-10check-hydra-status.sh: Improve error behaviourEelco Dolstra
2022-01-21install-darwin: dodge bash 3.2 command bugTravis A. Everett
The script is trying to find chown in a cross-platform-like way, but there's some sort of deficiency in `command -p` in the default macOS bash 3.2. It looks like it will just use whatever PATH is already set, instead of the "default" path. This attempts to hard-set a PATH via `getconf PATH`. It will just set an empty PATH if that fails for some reason. A properly-functioning `command -p` should not care what we set the PATH to here one way or the other. Hopefully fixes #5768.
2021-12-08Merge pull request #5521 from abathur/clearly_mark_validation_stepDomen Kožar
installer: clarify starting assumption task
2021-12-08Merge pull request #5489 from abathur/fix_macos_install_vim_pluginsDomen Kožar
darwin-install: fix break from bad vim plugins
2021-12-07darwin-install: fix break from bad vim pluginsTravis A. Everett
2021-12-06Update manual linksJan Tojnar
Fixes: https://github.com/NixOS/nixos-homepage/issues/762
2021-12-01darwin-install: nail down diskutilTravis A. Everett
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-11-30Add a github cron to check the hydra statusregnat
Add a regular github action that will check the status of the latest hydra evaluation. Things aren’t ideal right now because this job will only notify “the user who last modified the cron syntax in the workflow file” (so myself atm). But at least that’ll give a notification for failing hydra jobs
2021-11-19Apply some shellcheck suggestionsSandro Jäckel
2021-11-19Merge pull request #5607 from kmt-lnh/install-ergonomicsEelco Dolstra
curl usage in install script in sync with instructions
2021-11-19switch order of wget and curlKristof Molnar-Tatai
This change makes the script consistent with the installation instructions while keeping wget as an alternative.
2021-11-18Remove nix-reduce-build and nix-http-exportEelco Dolstra
These scripts are not installed and haven't been updated in many years.
2021-11-10installer: make rc replacement instructions explicitTravis A. Everett
2021-11-09installer: improve existing rc backup nagTravis A. Everett
2021-11-08installer: clarify starting assumption taskTravis A. Everett
We had a macOS user present in Matrix with some confusion because the lack of a clear task statement here made them think the error meant that a problem had occurred during the preceding task in a macOS install: "Fixing any leftover Nix volume state"
2021-11-04darwin-install: fix already-mounted store volumesTravis A. Everett
This adds an explicit unmount of the store volume to avoid cases where the installer can hang in await_volume when: - the user already has a store volume - that volume is already mounted somewhere other than /nix - they do not take a path through the installer that results in an explicit unmount (as both removing and encrypting the volume would do)
2021-11-03Reword "we"s to "I"s for consistencyJan Van Bruggen
This script uses multiple forms of the first-person POV: 1. "We" to refer to the Nix team (https://github.com/NixOS/nix/blob/1e7c796e66a692cd097b155bd0a60fedf20d554f/scripts/install-multi-user.sh#L72) 2. "We" to refer to the combination of the installation script & the user/executor (https://github.com/NixOS/nix/blob/1e7c796e66a692cd097b155bd0a60fedf20d554f/scripts/install-multi-user.sh#L710) 3. "We" to refer to the installation script alone (https://github.com/NixOS/nix/blob/1e7c796e66a692cd097b155bd0a60fedf20d554f/scripts/install-multi-user.sh#L602) 4. "I" to refer to the installation script alone (https://github.com/NixOS/nix/blob/1e7c796e66a692cd097b155bd0a60fedf20d554f/scripts/install-multi-user.sh#L200) Since I prefer POV 4 to POV 3, this changes all instances of POV 3 to POV 4.
2021-11-02installer: Do not use echo -e in #!/bin/sh scriptAnders Kaseorg
ShellCheck correctly warns: In scripts/install-nix-from-closure.sh line 218: echo -e "\nif [ -e $p ]; then . $p; fi # added by Nix installer" >> "$fn" ^-- SC3037: In POSIX sh, echo flags are undefined. In scripts/install-nix-from-closure.sh line 229: echo -e "\nif [ -e $p ]; then . $p; fi # added by Nix installer" >> "$fn" ^-- SC3037: In POSIX sh, echo flags are undefined. Indeed, this actually breaks on Ubuntu where /bin/sh is dash. Fixes #5458. Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2021-10-12darwin-install: fix incorrect fn nameTravis A. Everett
2021-09-21fix install on macOS montereyTravis A. Everett
2021-09-01install: fix addVolume perm issue for some usersTravis A. Everett
As reported in #5198, volume creation can fail with a permission error for some macOS users (probably secondary user accounts?) Sudo appears to be sufficient to avoid this. While I'm here, I also updated the sudo invocation added in 079bde2ae to use the _sudo explanation wrapper.
2021-08-30Merge pull request #5096 from AnatoleLucet/patch-1Eelco Dolstra
Remove curl deps in install script
2021-08-30Merge pull request #5179 from matthewbauer/use-zshrcEelco Dolstra
Revert "Use /etc/zshenv instead of /etc/zshrc for profile"