Commit graph

80 commits

Author SHA1 Message Date
Eelco Dolstra 699ba71b50 nixos-install: Source the profile when running inside the chroot 2015-08-05 14:33:18 +02:00
Domen Kožar ff88f4bcda nixos-install: correctly detect stdin 2015-04-29 18:48:21 +02:00
Jookia 71910be9ea nixos-install: Fix chroot flag not defaulting to Bash outside NixOS.
Passing the chroot flag to nixos-install without arguments should now give you a
Bash shell as intended rather than try an empty path.

This was masked by the user's shell (usually /bin/bash) being defaulted to by
chroot, and being found since their paths used NixOS conventions.
2015-04-28 06:37:04 -04:00
Jookia 7b37a5f168 nixos-install: Fix password prompt failing outside NixOS.
When bootstrapping from other distributions, nixos-install is unable to find
various tools in the chroot since their paths aren't aware of NixOS conventions.

This makes a small change to existing code by specifying nixpkgs/nixos instead
of just nixos when running nix-instantiate in the chroot. I haven't tested this
outside of bootstrapping, but the same specification is used elsewhere in the
code so I don't see why it wouldn't work.
2015-04-28 06:34:47 -04:00
Eelco Dolstra a38f130126 Revert "Set stricter permissions on /nix/store"
This reverts commit 066758758e7c0768ff8da51d208cdae0f33b368c because
it breaks NixOS VM tests.
2015-04-07 15:10:41 +02:00
lethalman f72b0c43f6 Merge pull request #6762 from lethalman/nixos-install
nixos-install: support -j, --cores and --option. Closes #6755
2015-03-30 18:06:53 +02:00
Eelco Dolstra 224d0d5302 Set stricter permissions on /nix/store
The nixbld group doesn't need read permission, it only needs write and
execute permission.

(cherry picked from commit 066758758e7c0768ff8da51d208cdae0f33b368c)
2015-03-18 10:58:08 +01:00
Luca Bruno fe6b0b15e6 nixos-install: support -j, --cores and --option. Closes #6755 2015-03-11 16:47:44 +00:00
Eelco Dolstra b9c4569b6b nixos-install: Create /root with 700 permission 2015-01-15 18:37:55 +01:00
Nikolay Amiantov 22eb0e22d3 nixos-install: fix -I flag 2014-12-18 22:43:40 +03:00
Domen Kožar 432490e319 fix users.mutableUsers = false; install in iso
(cherry picked from commit 9bc8bcbbdcc7cac98686877f09315bb749627732)
Signed-off-by: Domen Kožar <domen@dev.si>
2014-12-18 12:18:49 +01:00
aszlig cf7f15c92c
nixos-install: Pass CA cert bundle to chroot.
Since we're using HTTPS for the binary cache (introduced in faf0797) by
default, the binary cache should also be available during installation.

The file that is defined in SSL_CERT_FILE outside of the chroot is
copied over to /tmp/ca-cert.crt inside the chroot, so we have an
absolute path we can reference during nixos-install. However, this might
end up with the file not being cleaned up properly from outside of the
store, but neither would be /tmp/root so the cleanup issue needs to be
solved in another place (or commit to be more exact).

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2014-12-12 03:03:14 +01:00
Luca Bruno a1ded5c20e nixos-install: use absolute path when running passwd in chroot 2014-09-03 23:12:40 +02:00
Luca Bruno 59ad713288 nixos-install: set umask 0022 2014-09-03 23:12:40 +02:00
Jaka Kranjc 1d67ea1ce3 nixos-install.sh: added --root parameter
Previously:
- setting the mountpoint was only possible through an environment variable
- a discrepancy from nixos-generate-config, which has --root
2014-08-24 17:40:20 +02:00
aszlig 6ebe4a6a52
nixos-install: Fix copying symlink resolv.conf.
On some non-NixOS systems (for example those using "resolvconf"),
/etc/resolv.conf is a symlink. So let's dereference when copying hasts
and resolv.conf.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2014-08-17 06:46:41 +02:00
Eelco Dolstra 1e2291f23a nixos-install: Fix running it after again the activation script 2014-05-21 15:55:49 +02:00
Eelco Dolstra e135e6b35b nixos-install: Copy /etc/hosts
http://hydra.nixos.org/build/11130069
2014-05-21 11:20:33 +02:00
Eelco Dolstra 1c4fd9b25d nixos-install: Run in a separate UTS namespace
This prevents the activation script from clobbering our hostname.
2014-05-09 13:25:53 +02:00
Eelco Dolstra 61bdad6775 nixos-install: Don't bind-mount all of /etc
We only need a copy of /etc/resolv.conf for networking, and
/etc/{passwd,group} for building.
2014-05-09 00:52:02 +02:00
Eelco Dolstra 3ef8d6ad5c nixos-install: Add operation --chroot
"nixos-install --chroot" runs a command (by default a login shell) in
a chroot inside the NixOS installation in /mnt. This might useful for
poking around a new installation.
2014-05-09 00:52:02 +02:00
Eelco Dolstra 4fc151b5a3 nixos-install: Ask the user to set a root password
This removes the need to have an initially empty root password.
2014-05-09 00:52:02 +02:00
Eelco Dolstra 8919d736a0 nixos-install: Don't copy the bootstrap Nix if it's already there
This makes re-running nixos-install a bit faster.
2014-05-09 00:52:02 +02:00
Eelco Dolstra 22f102cbdc nixos-install: Assume the build user group is "nixbld"
The build user group is always "nixbld", so no need to detect it.
2014-05-09 00:52:02 +02:00
Eelco Dolstra 171d43ba4f nixos-install: Run in a private mount namespace
This ensures that all mounts are automatically cleaned up.
2014-05-09 00:52:02 +02:00
Eelco Dolstra e0e656ef46 nixos-install: Don't pass --show-trace by default 2014-05-09 00:51:48 +02:00
Eelco Dolstra 30180e8a24 Fix incorrect comment 2014-05-08 12:29:59 +02:00
Eelco Dolstra ef72fcc2aa Map --help flag to "man <command>" for more NixOS commands 2013-10-13 17:35:55 +02:00
Eelco Dolstra 31203732b3 Update the release expressions and the channel generators 2013-10-10 13:28:22 +02:00
Eelco Dolstra 5c1f8cbc70 Move all of NixOS to nixos/ in preparation of the repository merge 2013-10-10 13:28:20 +02:00
Renamed from modules/installer/tools/nixos-install.sh (Browse further)