Commit graph

248 commits

Author SHA1 Message Date
Eelco Dolstra 709470f2c0 Fix tests 2015-07-27 12:47:21 +02:00
Tuomas Tynkkynen df86813d97 nixos: Add derivations for SD card installation images on ARM
The resulting image can be copied to a SD card with `dd` and is directly
bootable by a suitably configured U-Boot. Though depending on the board, some
extra steps are required for copying U-Boot itself to the SD card.

Inside the image is a partition table, with a FAT32 /boot and a normal
writable EXT4 rootfs. It's possible to directly reuse the SD image's
partition layout and "install" NixOS on the same SD card by replacing
the default configuration.nix and nixos-rebuild, and actually is the
preferred way to use these images. To assist in this installation
method, the boot scripts on the image automatically resize the rootfs
partition to fit the SD card on the first boot.

The SD images come in two flavors; one for the ARMv6 Raspberry Pi,
and one multiplatform image for all the boards supported by the
mainline kernel's multi_v7_defconfig config target. At the moment, these
have been tested on:
    - Raspberry Pi Model B (512MB model)
    - NVIDIA Jetson TK1
    - Linksprite pcDuino3 Nano

To build, run:

nix-build '<nixpkgs/nixos>' -A config.system.build.sdImage \
    -I nixos-config='<nixpkgs/nixos/modules/installer/cd-dvd/sd-image-armv7l-multiplatform.nix>'
2015-07-26 00:31:20 +03:00
Eelco Dolstra 6948c3ab80 Installer: Add nomodeset and blacklist the nouveau driver
I observed a hang at the moment the nouveau driver gets loaded on a
GTX 970.
2015-07-25 19:06:07 +02:00
Eelco Dolstra 174dd0eae7 Fix description of boot.consoleLogLevel 2015-07-25 19:06:07 +02:00
Eelco Dolstra b1623385d0 nixos-generate-config: Container improvements 2015-07-17 11:27:33 +02:00
Eelco Dolstra fd06533def nixos-install: Don't barf if btrfs is missing 2015-07-13 17:55:49 +02:00
William A. Kennington III 08ff83eab3 nixos/btrfs: Fix parsing of btrfs subvolume show with btrfsprogs 4.1 2015-07-07 11:34:50 -07:00
William A. Kennington III 4b836fb680 nixos/installer: Add grub2_efi to the store so that it is available to install 2015-07-05 19:11:56 -07:00
aszlig f9bd72f24c
nixos/iso-image: Allow to customize menu label.
It comes in handy to alter the menu label if you're not building a NixOS
installer image but for example if you want to build a live system and
still want to re-use the iso-image.nix module.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-06-28 23:30:17 +02:00
Eelco Dolstra e5db79a859 Move stuff to modules/profiles/installation-device.nix 2015-06-10 15:28:55 +02:00
Vladimír Čunát 0b68b92062 nixos i18n.consoleFont: choose a different default
Distros often choose Terminus as the default, and it supports some
non-ASCII characters that we use in config. Fixes #8107.
2015-06-09 20:13:42 +02:00
Tuomas Tynkkynen 16165ddc38 install-cd: Include nixos-artwork to fix installer tests
Should fix at least nixos.tests.installer.simple.x86_64-linux
http://hydra.nixos.org/build/23001712:

machine# error: cannot download Encode-Locale-1.03.tar.gz from any mirror
machine# builder for ‘/nix/store/y8gbx2d2fdcvvjy1z53xksfgq66ydlx0-Encode-Locale-1.03.tar.gz.drv’ failed with exit code 1
machine# cannot build derivation ‘/nix/store/y1knci7rix3asnh2b4kfv8jhl2j99xih-perl-Encode-Locale-1.03.drv’: 1 dependencies couldn't be built
machine# cannot build derivation ‘/nix/store/7xspjwh48kg16drv1jjg5cffaqbxbp8p-perl-libwww-perl-6.05.drv’: 1 dependencies couldn't be built
machine# cannot build derivation ‘/nix/store/8qsmz3bbk1jwhh50c3i9700bkmn8ns5c-nss-cacert-3.19.1.drv’: 1 dependencies couldn't be built
machine# cannot build derivation ‘/nix/store/0rgf2l3mdszs4a989ympwc9gk2k8wq6z-nixos-artwork-e71b684.drv’: 1 dependencies couldn't be built
...
2015-06-08 19:12:59 +03:00
William A. Kennington III 514a9fdf87 Merge pull request #8173 from dezgeg/pr-kernel-config
kernel-config: Enable framebuffer console for BIOS systems & /proc/config.gz for ARM
2015-06-07 10:14:51 -07:00
Eelco Dolstra 6bf1853387 Don't include 4 editors in the minimal installation CD
Emphasis on "minimal".
2015-06-04 11:06:44 +02:00
Tuomas Tynkkynen 9c2f2bc893 kernel-config: Enable FB_VESA and FRAMEBUFFER_CONSOLE
Commit 159fed47bc (nixos/grub: Fix video display on efi) changed BIOS
systems to start in non-text mode as well. Enable FB_VESA to get a
framebuffer console on BIOS systems. Change FRAMEBUFFER_CONSOLE to 'y'
instead of the default 'm' to so the user doesn't need to manually load
the fbcon module anymore.

Other distros have similar defaults, at least on Arch:
    CONFIG_FB_VESA=y
    CONFIG_FRAMEBUFFER_CONSOLE=y
and on Ubuntu (12.04):
    CONFIG_FB_VESA=m
    CONFIG_FRAMEBUFFER_CONSOLE=y

Fixes #8139
2015-06-04 11:26:20 +03:00
Luca Bruno c12e1d7278 minimal-iso: enable nixos-manual 2015-06-02 18:14:45 +02:00
Eelco Dolstra e98da673e4 nixos-checkout: Add nixpkgs-channels as a remote
This way, you can do things like

  git checkout channels/nixos-14.12

to get the latest tested and built version of NixOS.
2015-05-20 14:16:36 +02:00
lethalman f2870bd77d Merge pull request #7601 from cstrahan/iso-name-fix
nixos: fix infinite recursion in isoImage.isoName
2015-05-04 10:24:38 +02:00
Steven Shaw 2a8577d7fe Correct spelling 2015-05-03 19:15:03 +10:00
Domen Kožar ff88f4bcda nixos-install: correctly detect stdin 2015-04-29 18:48:21 +02:00
Ricardo M. Correia f5e7190572 nixos.system_tarball_pc: Fix evaluation
It was broken due to 57b05765c9.

ZFS requires `networking.hostId` to be set.
2015-04-28 17:15:02 +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
Charles Strahan a64e90bdef nixos: fix infinite recursion in isoImage.isoName 2015-04-27 23:10:53 -04:00
Eelco Dolstra 57b05765c9 Don't include ntfs-3g by default
Issue #7117.
2015-04-19 22:06:45 +02:00
aszlig df31a338dc
nixos-rebuild: Conditionally update channels.
This partially reverts commit 3a4fd0bfc6.

Addresses another concern by @edolstra that users might not want to
update *all* channels. We're now reverting to the old behaviour but
after updating the "nixos" channel, we just check whether the channel
ships with a file called ".update-on-nixos-rebuild" and if it exists, we
update that channel as well.

Other channels than these are not touched anymore.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-04-13 12:54:19 +02:00
aszlig 3a4fd0bfc6
nixos-rebuild: Update all channels of user root.
Should make it even easier to use custom channels, because whenever the
user does a "nixos-rebuild --upgrade", it will also upgrade possibly
used ("used" as in referenced in configuration.nix) channels besides
"nixos". And if you also ship a channel tied to a particular version of
nixpkgs or even remove the "nixos" channels, you won't run into
unexpected situations where the system is not updating your custom
channels.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-04-13 00:09:00 +02: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
Domen Kožar 42c421adc3 Merge pull request #7180 from jagajaga/fix_generator
Fixing nixos-generate-config
2015-04-07 12:24:04 +02:00
Arseniy Seroka b11f662617 fix https://github.com/NixOS/nixpkgs/issues/3560 2015-04-05 16:12:14 +03:00
Vladimír Čunát 81fc066900 Merge #4678: nixos iso-image: support USB booting
by using syslinux (i.e. support the dd-method in addition to unetbootin).
@vcunat tidied the PR by squashing closely related changes together.
2015-03-31 15:12:16 +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
Vladimír Čunát 299da40f9f iso: make efi FS size adaptive, make deterministic
Fixes #6795.
This was co-authored with @bobvanderlinden.

(cherry picked from commit e19ac248ae59fd327c32b1ae3e37792c22a7c7ac)
Signed-off-by: Domen Kožar <domen@dev.si>

Conflicts:
	nixos/modules/installer/cd-dvd/iso-image.nix
2015-03-29 22:25:41 +02:00
William A. Kennington III 4868649f03 nixos/initrd: Generic library copying 2015-03-28 18:37:29 -07:00
Bob van der Linden 58112832a7 nixos: iso-image: use label "EFIBOOT" for efi.img 2015-03-24 22:15:32 +01:00
Bob van der Linden f0fd1c9bcf nixos: iso-image: use memtest86 params in syslinux
See also #6593.
2015-03-24 22:15:11 +01:00
Bob van der Linden 9ff9949896 nixos: iso-image: removed com32 entries from syslinux menu
These entries result in incorrect entries when UNetbootin writes
the image to an USB disk.
2015-03-24 22:09:06 +01:00
Bob van der Linden af68f24003 nixos: iso-image: solve UNetbootin compatiblity
There are a number of hidden restrictions on the syslinux
configuration file that come into play when UNetbootin
compatiblity is desired. With this commit these are documented.
2015-03-24 22:08:52 +01:00
Bob van der Linden a12ddc1964 nixos: iso-image: use generic boot-loader timeout
Syslinux uses different values than grub for timeout.
It uses 1/10 seconds as its unit and it uses 0 to disable timeouts.

In response to PR #5772.
2015-03-24 22:03:30 +01:00
Bob van der Linden 8d092270d2 nixos: iso-image: use syslinux bootloader for USB booting support
This changes the bootloader for iso generation from Grub to
syslinux. In addition this adds USB booting support, so that
"dd" can be used to burn the generated ISO to USB thumbdrives
instead of needing applications like UnetBootin.
2015-03-24 22:01:04 +01: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 a574065a81 nixos-rebuild: Add ‘dry-activate’ command
‘nixos-rebuild dry-activate’ builds the new configuration and then
prints what systemd services would be stopped, restarted etc. if the
configuration were actually activated. This could be extended later to
show other activation actions (like uids being deleted).

To prevent confusion, ‘nixos-rebuild dry-run’ has been renamed to
‘nixos-rebuild dry-build’.
2015-03-09 16:50:59 +01:00
Peter Simons 263a49be20 Merge pull request #5704 from eduarrrd/nixos-version
Add option to display git revision to nixos-version
2015-02-20 16:35:56 +01:00
Domen Kožar b83433cdd1 Remove gui (see #6207), use nixui instead 2015-02-08 10:47:58 +01:00
William A. Kennington III 42a6ac5209 nixos/iso: Increase efi image size to 15M 2015-02-07 20:38:24 -08:00
Eelco Dolstra 53710c752a nixos-rebuild: Update fallback code to update Nix 2015-01-27 18:58:20 +01:00
Eelco Dolstra b9c4569b6b nixos-install: Create /root with 700 permission 2015-01-15 18:37:55 +01:00
Eduard Bachmakov 86cd055477 Add option to display git revision to nixos-version
Example use case: git checkout `nixos-version --hash`
2014-12-27 21:43:04 +01:00
Domen Kožar a4961f09f6 Merge pull request #5390 from abbradar/nixos-isntall
nixos-install: fix -I flag
2014-12-23 18:15:14 +01:00
Nicolas B. Pierron 6a7971bee7 Merge pull request #5416 from nbp/nixos-option-include
nixos-option: Support -I option
2014-12-21 15:11:11 -08:00
Nicolas B. Pierron 974edc5056 nixos-option: Use <nixpkgs/nixos> instead of <nixpkgs>. 2014-12-21 01:33:06 +01:00
Nicolas B. Pierron 82a5f54c0d nixos-option: Support -I option. 2014-12-20 20:30:19 +01:00
Nicolas B. Pierron c9682a22ff nixos-option: Produce nicer error messages in case of typos. 2014-12-20 19:52:28 +01:00
Nicolas B. Pierron 640428d3c5 nixos-option: Handle 'attrsOf submodule' options. 2014-12-20 19:16:43 +01:00
Nicolas B. Pierron cd2f7ce9f9 nixos-option: Improve error messages to avoid reporting internal location and traces. 2014-12-19 23:00:52 +01:00
Nicolas B. Pierron b2abfe54b3 nixos-option: Print derivation outPath within attribute sets and list, when the strict mode is used. 2014-12-19 23:00:00 +01:00
Nicolas B. Pierron 9db6a84f0b nixos-option: Print the outPath of derivation for option values. 2014-12-19 22:33:24 +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
Eelco Dolstra bed675f400 nixos-generate-config: Don't emit networking.hostId
Systemd already generates /etc/machine-id. So there is no need to
generate another unique host identifer.
2014-12-15 17:03:28 +01:00
Eelco Dolstra 0d3a229baa nixos-generate-config: Add time zone 2014-12-15 16:55:03 +01:00
Domen Kožar 48a282b913 http://nixos.org -> https://nixos.org
(cherry picked from commit 78bb17dd22e4da4e3810fbc78185d73bb25ea73e)
Signed-off-by: Domen Kožar <domen@dev.si>
2014-12-14 11:26:45 +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
Eelco Dolstra faf0797c0c Use https://cache.nixos.org 2014-12-09 13:38:46 +01:00
aszlig 444987193e
nixos: Rename virtualbox to virtualboxGuest.
Especially new users could be confused by this, so we're now marking
services.virtualbox.enable as obsolete and defaulting to
services.virtualboxGuest.enable instead. I believe this now makes it
clear, that this option is for guest additions only.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2014-11-27 18:42:22 +01:00
Domen Kožar 85daeeb222 Merge pull request #4639 from lethalman/installer-nm
kde installer: enable networkmanager. Closes #3433
2014-11-21 22:29:10 +01:00
Bjørn Forsman 8835d932b1 nixos-generate-config: add 'lib' to module template
The NixOS manual says modules have the following signature:
 { config, lib, pkgs, ... }:

But our generated configuration.nix file lacks the 'lib' part. Add it.
2014-11-17 17:13:36 +01:00
wmertens 0b34eb1493 Allow starting a shell on stage 1 failure
When people copy the ISO to USB it can happen that the root device isn't known. Having a shell greatly improves that situation.
2014-11-15 00:14:26 +01:00
wmertens dda62c451c Re-enable ZFS in installer image
Hopefully #4807 fixes http://hydra.nixos.org/build/16883184
2014-11-13 10:31:15 +01:00
Ricardo M. Correia 7a7bf8368e nixos-generate-config: Configure networking.hostId by default
The host id value gets generated by reading a 32-bit value from
/dev/urandom.

This makes programs that rely on a correct host id more reliable.

It also makes using ZFS more seamless, as you don't need to configure
the hostId manually; instead, it becomes part of your config from the
moment you install NixOS.
2014-11-12 22:31:50 +01:00
Ricardo M. Correia e9affb4274 nixos: Add system-wide option to set the hostid
The old boot.spl.hostid option was not working correctly due to an
upstream bug.

Instead, now we will create the /etc/hostid file so that all applications
(including the ZFS kernel modules, ZFS user-space applications and other
unrelated programs) pick-up the same system-wide host id. Note that glibc
(and by extension, the `hostid` program) also respect the host id configured in
/etc/hostid, if it exists.

The hostid option is now mandatory when using ZFS because otherwise, ZFS will
require you to force-import your ZFS pools if you want to use them, which is
undesirable because it disables some of the checks that ZFS does to make sure it
is safe to import a ZFS pool.

The /etc/hostid file must also exist when booting the initrd, before the SPL
kernel module is loaded, so that ZFS picks up the hostid correctly.

The complexity in creating the /etc/hostid file is due to having to
write the host ID as a 32-bit binary value, taking into account the
endianness of the machine, while using only shell commands and/or simple
utilities (to avoid exploding the size of the initrd).
2014-11-12 22:31:49 +01:00
Eelco Dolstra 433a845081 Disable zfs in the ISO for now
It's giving zpool-import.service errors.

http://hydra.nixos.org/build/16883184
2014-11-12 15:32:21 +01:00
Luca Bruno 7885c2ed12 Revert "nixos: iso-image: use syslinux bootloader for USB booting support"
This reverts commit 455db168b3.
2014-11-08 14:33:27 +01:00
Luca Bruno e3611709d6 Revert "nixos: installation: make installation ISOs USB bootable"
This reverts commit b7f6a138b1.
2014-11-08 14:33:27 +01:00
Peter Simons b5fed52c43 Merge pull request #4238 from wkennington/master.boost
Make boost 156 the default
2014-11-03 23:03:01 +01:00
Eelco Dolstra f496c3cbe4 Obsolete security.initialPassword
You can now set users.extraUsers.root.initialHashedPassword instead.
2014-11-03 12:36:56 +01:00
William A. Kennington III 5ae216558f jfsrec: Remove derivation 2014-11-02 17:22:27 -08:00
Bob van der Linden b7f6a138b1 nixos: installation: make installation ISOs USB bootable 2014-11-02 17:35:16 +01:00
Bob van der Linden 455db168b3 nixos: iso-image: use syslinux bootloader for USB booting support
This changes the bootloader for iso generation from Grub to
syslinux. In addition this adds USB booting support, so that
"dd" can be used to burn the generated ISO to USB thumbdrives
instead of needing applications like UnetBootin.
2014-11-02 17:35:16 +01:00
Luca Bruno 6bb278659f kde installer: enable networkmanager. Closes #3433 2014-11-02 15:23:22 +01:00
William A. Kennington III 8636d93f54 Merge pull request #4213 from wkennington/master.zfsiso
[Dont Merge] nixos-iso: Add zfs / btrfs to supportedFilesystems
2014-10-25 18:01:17 -07:00
Luca Bruno e553e27f48 kde installer: Add gparted, nixos manual and konsole in the desktop 2014-10-23 18:59:25 +02:00
Aristid Breitkreuz bda39ae4de remove unused parameter from nixos module that is causing trouble with nixops 1.2 2014-10-19 14:10:28 +02:00
William A. Kennington III 5118dcf4fb nixos-iso: Add zfs / btrfs to supportedFilesystems 2014-10-14 20:24:43 -07:00
Eelco Dolstra 05163e99db nixos-rebuild: Don't pass -K by default 2014-09-10 14:57:26 +02:00
Eelco Dolstra 1a9c27c092 Typo 2014-09-08 13:58:44 +02:00
Eelco Dolstra 585983bc95 Merge remote-tracking branch 'origin/staging'
Conflicts:
	pkgs/applications/version-management/subversion/default.nix
2014-09-08 11:42:09 +02:00
Domen Kožar 18d9904433 nixos-option: fixes as suggested by @nbp 2014-09-06 20:59:14 +02:00
Vladimír Čunát 06fea81c6e Merge recent master into staging
Hydra: ?compare=1150594
2014-09-06 16:52:45 +02:00
Eelco Dolstra 1f7c775910 Remove unrar from the installation CD since it's unfree 2014-09-05 14:25:17 +02: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
Domen Kožar 2e97c06999 nixos-option: enable all flags by default and make output a bit readable cc @nbp 2014-09-03 22:08:25 +02:00
William A. Kennington III 1b63a1b75e nixos/iso-image: Fix grub-mkimage requiring a prefix 2014-09-03 09:26:44 -07:00
William A. Kennington III 87b6232f3a nixos/generate-config: Don't interpret btrfs subvols as bind mounts 2014-09-02 09:16:13 -07:00
William A. Kennington III 7fae423522 nixos/generate-config: Support detecting nested subvolumes 2014-09-02 09:16:13 -07:00
William A. Kennington III 36614ff3e2 Revert "Revert "Merge pull request #2449 from wkennington/master.grub""
This reverts commit 94205f5f21.

Conflicts:
	nixos/modules/system/boot/loader/grub/install-grub.pl
2014-09-02 09:16:13 -07:00
Peter Simons 1c0d15b90e Merge branch 'origin/master' into staging.
Conflicts:
	pkgs/development/libraries/ffmpeg/2.x.nix
	pkgs/development/libraries/serf/default.nix
2014-09-02 12:31:03 +02:00
Michael Raskin 94205f5f21 Revert "Merge pull request #2449 from wkennington/master.grub"
This reverts commit 469f22d717, reversing
changes made to 0078bc5d8f.

Conflicts:
	nixos/modules/installer/tools/nixos-generate-config.pl
	nixos/modules/system/boot/loader/grub/install-grub.pl
	nixos/release.nix
	nixos/tests/installer.nix

I tried to keep apparently-safe code in conflicts.
2014-08-31 12:58:37 +04:00