about summary refs log tree commit diff
path: root/scripts/install-nix-from-closure.sh
AgeCommit message (Collapse)AuthorFilesLines
2019-07-25 Add default for USER when unsetMatthew Bauer1-1/+1
uses $(id -u -n) when USER is unset, this is needed on some weird setups in Docker. Fixes #971
2019-05-15 Fix shellcheck errorEelco Dolstra1-1/+1
https://hydra.nixos.org/build/93359951
2019-05-08 Merge pull request #2594 from LnL7/darwin-10.12.6Graham Christensen1-3/+5
installer: update macOS version check to 10.12.2
2019-05-01 Merge pull request #2679 from bjornfor/offline-installEelco Dolstra1-1/+4
install script: don't abort when "nix-channel --update" fails
2019-02-22 remove noop uses of nix-store --initzimbatm1-6/+0
the nix-store --init command is a noop apparently
2019-02-20 install script: don't abort when "nix-channel --update" failsBjørn Forsman1-1/+4
Instead, print a message about what happened and tell the user what can be done (run "[sudo -i] nix-channel --update nixpkgs" again at a later time). This change allows installing Nix when you're offline. Since the multi-user installer is so verbose, the message isn't printed until the end. Fixes issue #2650 ("installation without internet connection").
2018-12-20 installer: update macOS version check to 10.12.2Daiderd Jordan1-3/+5
Nixpkgs will drop support for <10.12 soon and thus a nix release built using the 19.03 channel will also require a newer version of macOS.
2018-09-01 Default to single-user installGraham Christensen1-11/+14
2018-04-19 installer: default to the daemon installor for Linux with systemdGraham Christensen1-1/+1
Note: don't backport to 2.0-maintenance
2018-04-19 installer: allow opting in / out to the daemon installerGraham Christensen1-6/+31
By passing --daemon or --no-daemon, the installer can be forced to select one or the other installation options, despite what the automatic detection can provide. This commit can be backported to 2.0-maintenance because it explicitly turns off the daemon installation for Linux under systemd.
2018-03-29 Expand the multi-user installer to support Linuxes with systemdGraham Christensen1-2/+9
- 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
2017-07-30 Replace Unicode quotes in user-facing strings by ASCIIJörg Thalheim1-2/+2
Relevant RFC: NixOS/rfcs#4 $ ag -l | xargs sed -i -e "/\"/s/’/'/g;/\"/s/‘/'/g"
2017-07-14 Address feedback around printf & execGraham Christensen1-1/+1
2017-07-14 Switch to a fancy multi-user installer on DarwinGraham Christensen1-7/+17
2017-01-25 bail out if macOS 10.9 or lower is used during installerDomen Kožar1-0/+7
2016-12-19 shellcheck scripts/install-nix-from-closure.shJames Broadhead1-9/+9
2016-11-26 Revert "Get rid of unicode quotes (#1140)"Eelco Dolstra1-2/+2
This reverts commit f78126bfd6b6c8477fcdbc09b2f98772dbe9a1e7. There really is no need for such a massive change...
2016-11-25 Get rid of unicode quotes (#1140)Guillaume Maudoux1-2/+2
2016-11-03 installation: allow profile modification to be skipped (#1072)Manav Rathi1-13/+17
The current behaviour modifies the first writeable file from amongst .bash_profile, .bash_login and .profile. So .bash_profile (if it is writable) would be modified even if a user has already sourced nix.sh in, say, .profile. This commit introduces a new environment variable, NIX_INSTALLER_NO_MODIFY_PROFILE. If this is set during installation, then the modifications are unconditionally skipped. This is useful for users who have a manually curated set of dotfiles that they are porting to a new machine. In such scenarios, nix.sh is already sourced at a place where the user prefers. Without this change, the nix installer would insist on modifying .bash_profile if it exists. This commit also add documentations for both the current behaviour and the new override.
2016-10-13 SSL_CERT_FILE -> NIX_SSL_CERT_FILEEelco Dolstra1-2/+2
This prevents collisions with the "native" OpenSSL, in particular on OS X. Fixes #921.
2016-05-31 Fix reference to $NIX_LINKEelco Dolstra1-1/+1
2016-05-18 Fix `??` in Nix warning messageGabriel Gonzalez1-1/+1
Nix sometimes outputs a warning message like this: ``` directory /nix does not exist; creating it by running ‘?? using sudo ``` ... when it really meant to output something that looked like this: ``` directory /nix does not exist; creating it by running 'mkdir -m 0755 /nix && chown gabriel /nix' using sudo ``` The reason why is due to some bizarre behavior in Bash where it will translate anything of the form `$x’` to `??`, leading to the incorrect warning message. I don't know what is the origin of this Bash behavior, but the easiest fix is to just use ASCII quotes instead of unicode quotes.
2016-04-14 install-nix-from-closure: Don't run nix-store --verifyEelco Dolstra1-5/+0
Verification is slow. Also, we really shouldn't advise users to nuke their store.
2016-04-10 Remove information about nix-store --optimiseWout Mertens1-9/+0
2016-04-10 Always verify nix store on installwmertens1-1/+18
Just wasted a couple hours chasing shadows because the nix store got corrupted and there was no indication of that anywhere. Since an install is one-time only, might as well verify. Optimization showed that the copied files aren't read-only; fixed that as well. Also, use /bin/sh since there's a good chance that this script will be run on systems without /bin/bash
2016-02-19 Merge branch 'master' of git://github.com/stepcut/nixShea Levy1-1/+1
2016-02-10 Check shell profile is writeable before modifyingAlex Cruice1-1/+1
The `set -e` at the top of the script causes the installation to fail to complete if the shell profile is not writeable. Checking file existence only is not enough.
2015-12-06 Clarify installation error message that is shown when /nix/store exists but ↵Jeremy Shaw1-1/+1
is not writable by the user
2015-06-08 Update cacert locationsEelco Dolstra1-1/+1
2015-02-11 Nix install script failed when "cd" printed to stdout.Jeff Ramnani1-1/+1
In some cases the bash builtin command "cd" can print the variable $CWD to stdout. This caused the install script to fail while copying files because the source path was wrong. Fixes #476.
2014-12-13 Install cacert before running nix-channelEelco Dolstra1-5/+6
Also, make it more robust against incorrent SSL_CERT_FILE values.
2014-12-10 Include cacert in the binary tarballEelco Dolstra1-2/+5
This prevents having to fetch Nixpkgs or cacert over http.
2014-12-10 Always use https to fetch the Nixpkgs channelEelco Dolstra1-5/+1
2014-11-18 Add a test for the binary tarball installerEelco Dolstra1-2/+4
2014-08-20 Use proper quotes everywhereEelco Dolstra1-3/+3
2014-08-07 install-nix-from-closure.sh: Use https channel if possibleEelco Dolstra1-1/+5
2014-07-29 install-nix-from-closure.sh: Install cacertEelco Dolstra1-0/+3
2014-04-10 Don't barf when installing as rootEelco Dolstra1-1/+0
2014-02-26 Installer: Handle DarwinEelco Dolstra1-1/+1
"cp -r" doesn't copy symlinks properly on Darwin, but "cp -R" does. Fixes #215.
2014-02-10 Force use of BashEelco Dolstra1-1/+1
"echo -n" doesn't work with /bin/sh on Darwin.
2014-02-10 Binary tarball: Automatically create /nixEelco Dolstra1-17/+94
The tarball can now be unpacked anywhere. The installation script uses "sudo" to create /nix if it doesn't exist. It also fetches the nixpkgs-unstable channel.
2014-02-10 Binary tarball: Automatically fetch the Nixpkgs channelEelco Dolstra1-1/+7
2012-05-22 Generate binary tarballs for installing NixEelco Dolstra1-0/+34
For several platforms we don't currently have "native" Nix packages (e.g. Mac OS X and FreeBSD). This provides the next best thing: a tarball containing the closure of Nix, plus a simple script "nix-finish-install" that initialises the Nix database, registers the paths in the closure as valid, and runs "nix-env -i /path/to/nix" to initialise the user profile. The tarball must be unpacked in the root directory. It creates /nix/store/... and /usr/bin/nix-finish-install. Typical installation is as follows: $ cd / $ tar xvf /path/to/nix-1.1pre1234_abcdef-x86_64-linux.tar.bz2 $ nix-finish-install (if necessary add ~/.nix-profile/etc/profile.d/nix.sh to the shell login scripts) After this, /usr/bin/nix-finish-install can be deleted, if desired. The downside to the binary tarball is that it's pretty big (~55 MiB for x86_64-linux).