Commit graph

200 commits

Author SHA1 Message Date
viric 982ce5ed58 Merge pull request #8978 from dezgeg/pr-arm-images
ARM SD card image expressions
2015-07-29 14:13:57 +02:00
Eelco Dolstra d166c854b6 Add option system.stateVersion
This option requests compatibility with older NixOS releases with
respect to stateful data, in cases where new releases have defaults
that might be incompatible with system state of existing NixOS
deployments. For instance, if we change the default version of
PostgreSQL, existing deployments will break if the new version can't
read databases created by the old version.

So for example, setting

  system.stateVersion = "15.07";

requests that options like services.postgresql.package use defaults
corresponding to the 15.07 release branch. Note that
nixos-generate-config emits this option. (In the future, NixOps may
set system.stateVersion to the NixOS release in use when the machine
was created.)

See also #7939 for another motivating example.
2015-07-27 20:30:09 +02:00
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