Age | Commit message (Collapse) | Author |
|
It was accidentally triggering the auto-chroot code path because
/nix/var/nix didn't exist.
Fixes #6790.
|
|
Fixes: https://github.com/NixOS/nixos-homepage/issues/762
|
|
|
|
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>
|
|
installer: fix --no-modify-profile help text
|
|
|
|
|
|
|
|
While the progress dots during the copying of the store work fine on a
normal terminal, those look pretty off if the script is run inside a
provisioning script of e.g. `vagrant` or `packer` where `stderr` and
`stdout` are captured:
default: .
default: ..
default: .
default: .
default: .
To work around this, the script checks with `-t 0` if it's
running on an actual terminal and doesn't show the progress if that's not
the case.
|
|
The goal is to allow the installation and testing of arbitrary Nix
versions. Extend the base installer to accept a `--tarball-url-prefix
<url>` to change where the Nix tarball is getting downloaded from.
Once this is merged it should allow to:
1. Pick an evaluation at https://hydra.nixos.org/jobset/nix/master that
looks healthy
2. Select the installedScript build and find the store path.
Now equipped with all of this, use an instance of nar-serve to fetch the
install script and release tarballs:
curl -sfL https://nar-serve.numtide.com/nix/store/rkv4yh7pym941bhj0849zqdkg2546bdv-installer-script/install \
| sh --tarball-url-prefix https://nar-serve.numtide.com/nix/store
Or with cachix, strip the /nix/store and derivation name and then:
curl -sfL https://mycache.cachix.org/serve/rkv4yh7pym941bhj0849zqdkg2546bdv/install \
| sh --tarball-url-prefix https://mycache.cachix.org/serve
Fixes #4047
|
|
Macos big sur installer fixes
|
|
|
|
- xpath -> xmllint: xpath's cli interface changed in Big Sur
rather than add conditional logic for picking the correct
syntax for xpath, I'm changing to xmllint --xpath, which
appears to be consistent across versions I've tested...
- /plist/dict/key[text()='Writable']/following-sibling::true[1]
doesn't do quite what's expected. It was written to try to
select a <true /> node paired with the Writable key, but it
will also select the *next* <true /> node that appears even
if it was paired with another key.
- I think there's also a logic bug in the conditionals here.
I'm not sure anyone ever actuall saw it, thanks to the xpath
bug, though. With the xpath fix, this conditional passes if /nix
does not exist, / IS writable, and the version is Catalina+.
I think it meant to test for /nix does not exist, / is NOT
writable, and the version is Catalina+. I reworked this lightly
to make it a little clearer at the code level.
|
|
Keeping this commit narrow for reviewability, but some of these
conditionals will change in subsequent commits in this PR.
Fixes #3852.
|
|
Fixes #1560, #2377.
|
|
Add a script to install nix on non-systemd systems.
|
|
|
|
|
|
|
|
also see https://nixos.org/download.html
|
|
- --no-channel-add didn't have effect on multi-user installation
- some new flags didn't work at all
- document all installer flags
|
|
install-multi-user: allow overriding user count
|
|
|
|
|
|
This should handle installation scenarios we can handle with
anything resembling confidence. Goal is approximating the existing
setup--not enforcing a best-practice...
Approaches (+ installer-handled, - manual) and configs each covers:
+ no change needed; /nix OK on boot volume:
All pre-Catalina (regardless of T2 or FileVault use)
+ create new unencrypted volume:
Catalina, pre-T2, no FileVault
+ create new encrypted-at-rest volume:
Catalina, pre-T2, FileVault
Catalina, T2, no FileVault
- require user to pre-create encrypted volume
Catalina, T2, FileVault
|
|
|
|
|
|
The default login shell for users on macOS 10.15 changed from bash to
zsh. So while generally nonstandard we need to configure it to make nix
function out of the box on macOS.
|
|
Starting macOS 10.15 /nix can't be creasted directly anymore due to the
readonly filesystem, but synthetic.conf was introduced to enable
creating mountpoints or symlinks for special usecases like package
managers.
|
|
|
|
|
|
|
|
This is commonly the default behavior with -R, but POSIX leaves the
default unspecified.
|
|
|
|
uses $(id -u -n) when USER is unset, this is needed on some weird
setups in Docker. Fixes #971
|
|
https://hydra.nixos.org/build/93359951
|
|
installer: update macOS version check to 10.12.2
|
|
install script: don't abort when "nix-channel --update" fails
|
|
the nix-store --init command is a noop apparently
|
|
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").
|
|
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.
|
|
|
|
Note: don't backport to 2.0-maintenance
|
|
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.
|
|
- 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
|
|
Relevant RFC: NixOS/rfcs#4
$ ag -l | xargs sed -i -e "/\"/s/’/'/g;/\"/s/‘/'/g"
|
|
|
|
|
|
|
|
|