Commit Graph

314 Commits

Author SHA1 Message Date
Graham Christensen
4f34e030a5 Merge pull request #22677 from grahamc/drop-kdm-kde4-modules
Drop kdm and kde4 modules
2017-02-12 08:36:33 -05:00
Ricardo M. Correia
123cbd40c2 raspberryPi boot loader: don't remove xx-initrd files
The Raspberry Pi boot loader was deleting all xx-initrd text files
(which simply contain the path to the actual initrd files) just after
having created them. The code was actually trying to delete real,
obsolete initrd files, which are named <hash>-initrd-initrd (after path
cleaning), but the glob was catching the other files as well.
2017-02-12 02:48:57 +02:00
Ricardo M. Correia
c19b17d14f raspberryPi boot loader: fix booting Raspberry Pi 3
The Raspberry Pi 3 seems to need the .DTB file when booting the kernel,
so we must copy it to /boot when installing a new kernel.
2017-02-12 02:48:57 +02:00
Graham Christensen
3cec7d10df
kdm: drop service 2017-02-11 13:55:09 -05:00
Franz Pletz
068dad3a21
systemd-boot: fix evaluation 2017-01-21 14:42:10 +01:00
Linus Heckemann
98bd722d1d systemd-boot: allow setting editor security option (#21853) 2017-01-21 14:24:26 +01:00
Bjørn Forsman
3af715af90 Revert "fix 2 xml errors in the description of boot.loader.grub.efiInstallAsRemovable"
This reverts commit 656cc3acaf because it
causes building the manual to fail:

  $ nixos-rebuild build
  ...
  building path(s) ‘/nix/store/s9y5z78z5pssvmixcmv9ix13gs8xj87f-manual-olinkdb’
  Writing /nix/store/s9y5z78z5pssvmixcmv9ix13gs8xj87f-manual-olinkdb/manual.db for book(book-nixos-manual)
  ./man-pages.xml:625: element para: Relax-NG validity error : Did not expect element para there
  ./man-pages.xml:3: element variablelist: Relax-NG validity error : Element refsection has extra content: variablelist
  ./man-pages.xml:29: element refsection: Relax-NG validity error : Element refentry has extra content: refsection
  ./man-pages.xml:3: element reference: Relax-NG validity error : Element reference failed to validate content
  ./man-pages.xml fails to validate

CC @cleverca22, @Mic92
2016-12-17 11:45:31 +01:00
michael bishop
656cc3acaf fix 2 xml errors in the description of boot.loader.grub.efiInstallAsRemovable 2016-12-16 20:39:40 +01:00
michael bishop
e5cefadef7 fix indentation in several nixos option descriptions 2016-12-16 18:29:25 +01:00
Jörg Thalheim
cb8af0ca51 Merge pull request #19379 from nixy/master
grub bootloader: add forceInstall option
2016-11-21 15:15:45 +01:00
Eric Sagnes
4a600b0437 raspberrypi module: use enum 2016-11-16 22:37:36 +09:00
Eric Sagnes
80b854739c grub module: use enum 2016-11-04 13:05:13 +09:00
Andrew R. M
a31bf8961a grub bootloader: add forceInstall option
Using the --force option on GRUB isn't recommended, but there are very
specific instances where it makes sense. One example is installing on a
partitionless disk.
2016-11-03 05:50:42 -04:00
Jörg Thalheim
08cb89ae19 Merge pull request #19102 from Mic92/systemd-boot
systemd-boot: port builder to python3
2016-10-03 10:47:18 +02:00
Joachim F
7e80c42b0e Merge pull request #18511 from ericsagnes/feat/remove-optionSet
modules: optionSet -> submodule
2016-10-01 17:57:45 +02:00
Jörg Thalheim
8bb4551273
systemd-boot: inline add_entry function 2016-09-30 13:56:19 +02:00
Jörg Thalheim
4e0423467a
systemd-boot: port builder to python3
see #18185
2016-09-30 13:28:42 +02:00
jokogr
b12debc076 grub: Do not check for duplicated devices in mirroredBoots on UEFI (#18625)
When Grub is to be used with UEFI, it is not going to write to any MBR
of any disk. As such, it is safe to use multiple "nodev" device entries
when mirroring the ESP partition to multiple disks.

E.g.:

```
boot.loader.grub = {
  enable = true;
  version = 2;
  zfsSupport = true;
  efiSupport = true;
  mirroredBoots = [
    { devices = [ "nodev" ]; path = "/boot1"; efiSysMountPoint = "/boot1"; }
    { devices = [ "nodev" ]; path = "/boot2"; efiSysMountPoint = "/boot2"; }
    { devices = [ "nodev" ]; path = "/boot3"; efiSysMountPoint = "/boot3"; }
  ];
};

boot.loader.efi.canTouchEfiVariables = true;
```

Fixes #18584
2016-09-25 07:37:18 +02:00
obadz
93974eb98b grub: fix manual build 2016-09-16 19:12:47 +01:00
obadz
eda4f5d409 grub: clarify efiInstallAsRemovable docstring 2016-09-16 18:09:50 +01:00
obadz
1c9ac8aabc grub: add boot.loader.grub.efiInstallAsRemovable
Closes #16374
2016-09-16 18:02:36 +01:00
Eric Sagnes
55e437806a grub module: optionSet -> submodule 2016-09-13 12:53:12 +09:00
Domen Kožar
f5271680c4 Fixes #14831 by using full path for binaries used in install-grub.pl
Both btrfs-progs and utillinux are ~5MB, we may discuss in future
to handle this better but I see no better way at the moment than
increaing purity in the install process.
2016-09-01 10:36:38 +02:00
Domen Kožar
2a7293fd9d install-grub.pl: fix a double slash prefix bug 2016-09-01 10:14:44 +02:00
Domen Kožar
5e5b0d039c install-grub.pl: add comments 2016-09-01 10:14:44 +02:00
obadz
c7142c1aa3 Merge branch 'master' into staging 2016-08-28 13:33:13 +01:00
Domen Kožar
4af09e0031 Merge pull request #14311 from Profpatsch/mkRemovedOptionModule-replacement
mkRemovedOptionModule: add replacement argument
2016-08-28 13:55:28 +02:00
obadz
24a9183f90 Merge branch 'hardened-stdenv' into staging
Closes #12895

Amazing work by @globin & @fpletz getting hardened compiler flags by
enabled default on the whole package set
2016-08-22 01:19:35 +01:00
Shea Levy
b4954a8f38 Deprecate --install-grub in favor of --install-bootloader for nixos-rebuild.
Fixes #14293
2016-08-16 07:51:58 -04:00
Robin Gloster
5185bc1773 Merge remote-tracking branch 'upstream/master' into hardened-stdenv 2016-07-15 14:41:01 +00:00
Tuomas Tynkkynen
931706cdc1 extlinux-conf-builder: Choose whether to use DTBs on per-generation basis
Previously, the value from stdenv.platform.kernelDTB was used. That
doesn't work well if both kinds (DTB and non-DTB) of generations exist
in the system profile.
2016-07-10 03:03:51 +03:00
Bjørn Forsman
aeb516c741 nixos/grub: change state file device separator from ':' to ','
':' is currently used as separator in /boot/grub/state for the list of
devices GRUB should be installed to. The problem is that ':' itself may
appear in a device path:

  /dev/disk/by-id/usb-SanDisk_Cruzer_20043512300546C0B317-0:0

With such a path, NixOS will install GRUB *every* time, because it
thinks the configuration differs from the state file (due to the wrong
list split). Fix it by using ',' as separator.

For existing systems with GRUB installed on multiple devices, this
change means that GRUB will be installed one extra time.
2016-07-06 00:11:57 +02:00
Robin Gloster
8031cba2ab Merge remote-tracking branch 'upstream/master' into hardened-stdenv 2016-06-10 09:27:04 +00:00
Eelco Dolstra
e8ad22be12 Rename gummiboot module 2016-06-01 12:55:56 +02:00
Eelco Dolstra
9f0e137338 Rename boot.loader.gummiboot.enable -> boot.loader.systemd-boot.enable 2016-06-01 12:55:52 +02:00
Eelco Dolstra
f222689aba Use systemd-boot instead of gummiboot
Gummiboot is part of systemd now so we may as well use it.
2016-05-31 17:02:47 +02:00
Robin Gloster
2d382f3d98 Merge remote-tracking branch 'upstream/master' into hardened-stdenv 2016-05-30 19:39:34 +00:00
Profpatsch
16c923cef2 modules/mkRemovedOptionModule: add replacement doc
When displaying a warning about a removed Option we should always
include reasoning why it was removed and how to get the same
functionality without it.

Introduces such a description argument and patches occurences (mostly
with an empty string).

startGnuPGAgent: further notes on replacement
2016-05-29 00:42:08 +02:00
Eelco Dolstra
32bed83b18 Remove boot.loader.grub.timeout and boot.loader.gummiboot.timeout
There is a generic boot.loader.timeout option.
2016-05-25 11:39:17 +02:00
Franz Pletz
f8d481754c
Merge remote-tracking branch 'origin/master' into hardened-stdenv 2016-05-18 17:10:02 +02:00
Robin Gloster
c92bca56f8 Merge remote-tracking branch 'upstream/master' into hardened-stdenv 2016-05-02 22:58:02 +00:00
Nikolay Amiantov
5f19542581 Merge commit 'refs/pull/14694/head' of git://github.com/NixOS/nixpkgs into staging 2016-04-25 18:02:23 +03:00
Tuomas Tynkkynen
1d4b21ef42 treewide: Use correct output of config.nix.package in non-string contexts 2016-04-25 16:44:38 +02:00
Nikolay Amiantov
ab0a0c004e makeSearchPathOutputs: refactor to makeSearchPathOutput 2016-04-25 13:24:39 +03:00
Alexander Ried
1d6990db06 boot.loader.grub: fix variable name (#14855) 2016-04-20 22:27:34 +02:00
Robin Gloster
d020caa5b2 Merge remote-tracking branch 'upstream/master' into hardened-stdenv 2016-04-18 13:49:22 +00:00
Nikolay Amiantov
8b7ebaffeb replace makeSearchPath tree-wise to take care of possible multiple outputs 2016-04-13 22:09:41 +03:00
Robin Gloster
a73a28de7b fix grammar errors 2016-04-06 16:16:23 +00:00
Peter Simons
a1fa485378 Revert "Remove double-backslashes from grub conf file".
This reverts commit b861bf8ddf, because according to @mdorman [1] this
change rendered his NixOS systems unbootable, and we probably don't want that.

[1] b861bf8ddf (commitcomment-16058598)
2016-02-12 13:14:34 +01:00
Ben Booth
b861bf8ddf Remove double-backslashes from grub conf file
The double-backspashes in the splashimage, kernel, and initrd sections serve no purpose and confuse pygrub
2016-02-11 12:05:15 -08:00
Nikolay Amiantov
c8ca34e269 init-script-builder: handle containers without a kernel 2016-02-10 23:27:28 +00:00
Nikolay Amiantov
5396a01b6c init-script-builder: handle containers without a kernel 2016-02-10 02:05:47 +03:00
Thomas Strobel
a04a7272aa Add missing 'type', 'defaultText' and 'literalExample' in module definitions
- add missing types in module definitions
- add missing 'defaultText' in module definitions
- wrap example with 'literalExample' where necessary in module definitions
2016-01-17 19:41:23 +01:00
Arseniy Seroka
c03fe79265 Merge pull request #10996 from oxij/nixos-label
nixos: introduce system.nixosLabel support
2016-01-09 20:52:08 +03:00
Jan Malakhovski
119c8f91e7 nixos: introduce system.nixosLabel option and use it where appropriate
Setting nixosVersion to something custom is useful for meaningful GRUB
menus and /nix/store paths, but actuallly changing it rebulids the
whole system path (because of `nixos-version` script and manual
pages). Also, changing it is not a particularly good idea because you
can then be differentitated from other NixOS users by a lot of
programs that read /etc/os-release.

This patch introduces an alternative option that does all you want
from nixosVersion, but rebuilds only the very top system level and
/etc while using your label in the names of system /nix/store paths,
GRUB and other boot loaders' menus, getty greetings and so on.
2016-01-08 22:26:15 +00:00
Tobias Geerinckx-Rice
82419575aa btrfsProgs -> canonical btrfs-progs 2016-01-03 20:38:44 +01:00
Eelco Dolstra
1ba2015450 install-grub: Make more robust against GC'ed system profile entries
Previously this barfed with:

  updating GRUB 2 menu...
  fileparse(): need a valid pathname at /nix/store/zldbbngl0f8g5iv4rslygxwp0dbg1624-install-grub.pl line 391.
  warning: error(s) occured while switching to the new configuration
2015-12-30 15:07:18 +01:00
Thomas Strobel
d856841ba4 nixos trustedGRUB: add support for HP laptops 2015-12-22 03:12:30 +01:00
Nicole Angel
c840974c24 grub: fix typo in variable name (trivial) 2015-12-10 19:52:08 +01:00
Eelco Dolstra
5f077e2296 Factor out option renaming
Option aliases/deprecations can now be declared in any NixOS module,
not just in nixos/modules/rename.nix. This is more modular (since it
allows for example grub-related aliases to be declared in the grub
module), and allows aliases outside of NixOS (e.g. in NixOps modules).

The syntax is a bit funky. Ideally we'd have something like:

  options = {
    foo.bar.newOption = mkOption { ... };
    foo.bar.oldOption = mkAliasOption [ "foo" "bar" "newOption" ];
  };

but that's not possible because options cannot define values in
*other* options - you need to have a "config" for that. So instead we
have functions that return a *module*: mkRemovedOptionModule,
mkRenamedOptionModule and mkAliasOptionModule. These can be used via
"imports", e.g.

  imports = [
    (mkAliasOptionModule [ "foo" "bar" "oldOption" ] [ "foo" "bar" "newOption" ]);
  ];

As an added bonus, deprecation warnings now show the file name of the
offending module.

Fixes #10385.
2015-10-14 18:18:47 +02:00
Thomas Strobel
7a8980193d nixos grub: trustedBoot: introduce safety check that TPM is available 2015-10-06 20:12:39 +02:00
Jan Malakhovski
6eadb16022 nixos: fix some types 2015-09-18 18:48:50 +00:00
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
f07b2121f9 Fix grub-reboot 2015-07-27 01:07:38 +02:00
Tuomas Tynkkynen
8665b0d8b1 extlinux-conf-builder: Fix warning when building in chroot
When using extlinux-conf-builder in a nix build using chroots, the
following error message could be seen:

/nix/store/XXX-extlinux-conf-builder.sh: line 121: cd: /nix/var/nix/profiles: No such file or directory

To avoid this, just skip the code path parsing /nix/var/nix/profiles
when $numGenerations (passed from the command line) is 0 (which is the
only legal value of $numGenerations in a nix build context).
2015-07-26 00:31:20 +03:00
Eelco Dolstra
c49b24c940 Fix capitalisation 2015-07-25 19:06:07 +02:00
Tuomas Tynkkynen
a6c95a3f7d extlinux-conf-builder: Set menu title to force prompt display
Without a menu title, U-Boot's distro scripts just autoboot the first
entry by default.

When I initially wrote this, my board wasn't apparently running stock
U-Boot but had some local hacks saved in the U-Boot's environment
which made it always display the prompt.
2015-07-22 16:08:18 +03:00
Tuomas Tynkkynen
8496f71e92 extlinux-conf-builder: Make it work on non-DTB systems
With this, boot.loader.generic-extlinux-compatible can be used with
linuxPackages_rpi on the Raspberry Pi.
2015-07-22 16:08:17 +03:00
Tuomas Tynkkynen
6147909f8e extlinux-conf-builder: Properly copy kernels for the default entry
When calling addEntry inside a subshell, the filesCopied array would
be updated only in the subshell's environment. This would only cause an
issue if no -g flag was passed to the script, causing no kernels
to be copied.
2015-07-22 16:08:17 +03: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
cb343e7be6 nixos/install-grub: Fix symlink installation for boot filesystems which don't support symlinking
Some filesystems like fat32 don't support symlinking and need to be
supported on /boot as an efi system partition. Instead of creating the symlink directly in boot, create the symlink in
a temporary directory which has to support symlinking.
2015-07-05 18:34:47 -07:00
Thomas Strobel
4ee2d39fbf grub installation: fix: simplify code 2015-07-05 21:55:56 +02:00
Thomas Strobel
65cbbc75b0 grub installation: integrate trustedGRUB + fix broken equality check 2015-07-05 19:51:53 +02:00
William A. Kennington III
d4fc2b4d99 nixos/install-grub: Fix grub1 installation 2015-06-17 11:47:36 -07:00
Luca Bruno
033605e87f Merge branch 'nixos-subdir'
Conflicts:
	nixos/modules/system/boot/loader/grub/grub.nix
2015-06-13 15:18:12 +02:00
Luca Bruno
3754de550f nixos/grub: allow customization of the nix store path 2015-06-13 15:02:00 +02:00
William A. Kennington III
502a19b2b4 nixos/grub: Support labeling efi bootloaders with independent id's 2015-06-10 15:47:08 -07:00
William A. Kennington III
c891134b77 nixos/grub: Prevent module errors and make gfxmode configurable 2015-06-10 11:50:35 -07:00
William A. Kennington III
48381b7621 nixos-artwork: Make into a derivation and use fetchfromgithub 2015-06-08 18:32:32 -07:00
William A. Kennington III
1e98da6d99 nixos/grub: Use nixos artwork 2015-05-29 13:26:32 -07:00
William A. Kennington III
159fed47bc nixos/grub: Fix video display on efi 2015-05-29 13:26:32 -07:00
William A. Kennington III
d4f3930201 nixos/grub: Fix defaultConfig 2015-05-29 13:26:32 -07:00
William A. Kennington III
b07d2a447b nixos/grub: Fix assertion 2015-05-25 23:03:31 -07:00
William A. Kennington III
fd5b273e82 nixos/grub: Add the ability to mirror grub to multiple partitions 2015-05-25 20:23:06 -07:00
William A. Kennington III
f42d2503d7 Merge pull request #7643 from Shados/fix-grub-efi-only
grub2: Fix EFI-only installation
2015-05-25 13:55:20 -07:00
Tuomas Tynkkynen
6d176afe5e generic-extlinux-compatible: Add new bootloader for ARM
This module generates a /boot/extlinux/extlinux.conf bootloader
configuration file that is supported by e.g. U-Boot:

http://git.denx.de/?p=u-boot.git;a=blob;f=doc/README.distro;hb=refs/heads/master

With this, all ARM boards supported by U-Boot can be booted in a common
way (a single boot file generator, all boards booting via initrd like
x86) and with same boot menu functionality as GRUB has.

-- sample extlinux.conf file --
# Generated file, all changes will be lost on nixos-rebuild!

# Change this to e.g. nixos-42 to temporarily boot to an older configuration.
DEFAULT nixos-default

TIMEOUT 50

LABEL nixos-default
  MENU LABEL NixOS - Default
  LINUX ../nixos/n7vxfk60nb5h0mcbhkwwxhcz2q2nvxzv-linux-4.1.0-rc3-cpufreq-zImage
  INITRD ../nixos/0ss2zs8sb6d1qn4gblxpwlxkfjsgs5f0-initrd-initrd
  FDTDIR ../nixos/n7vxfk60nb5h0mcbhkwwxhcz2q2nvxzv-linux-4.1.0-rc3-cpufreq-dtbs
  APPEND systemConfig=/nix/store/469qvr43ln8bfsnk5lzcz6m6jfcgdd4r-nixos-15.06.git.0b7a7a6M init=/nix/store/469qvr43ln8bfsnk5lzcz6m6jfcgdd4r-nixos-15.06.git.0b7a7a6M/init loglevel=8 console=ttyS0,115200n8 drm.debug=0xf

LABEL nixos-71
  MENU LABEL NixOS - Configuration 71 (2015-05-17 21:32 - 15.06.git.0b7a7a6M)
  LINUX ../nixos/n7vxfk60nb5h0mcbhkwwxhcz2q2nvxzv-linux-4.1.0-rc3-cpufreq-zImage
  INITRD ../nixos/0ss2zs8sb6d1qn4gblxpwlxkfjsgs5f0-initrd-initrd
  FDTDIR ../nixos/n7vxfk60nb5h0mcbhkwwxhcz2q2nvxzv-linux-4.1.0-rc3-cpufreq-dtbs
  APPEND systemConfig=/nix/store/469qvr43ln8bfsnk5lzcz6m6jfcgdd4r-nixos-15.06.git.0b7a7a6M init=/nix/store/469qvr43ln8bfsnk5lzcz6m6jfcgdd4r-nixos-15.06.git.0b7a7a6M/init loglevel=8 console=ttyS0,115200n8 drm.debug=0xf
2015-05-17 23:38:03 +03:00
Lluís Batlle i Rossell
d8a2bb86c0 Raspberry Pi 2 changes to make it boot.
It boots, but some things still don't work:
1) Installation of DTBs
2) Boot of initrd

Booting still needs a proper config.txt in /boot, which could probably be
managed by NixOS.
2015-05-09 17:05:24 +00:00
Alexei Robyn
60da99ea2a grub module: removed invalid device check for grub EFI installation 2015-04-30 19:28:34 +10:00
Thomas Strobel
66c73da5f9 Fix grub for "nodev" targets. 2015-04-18 19:22:25 +02:00
Joachim Fasting
d375550ead nixos: add a few missing type specifiers under boot.* 2015-02-28 09:19:23 +01:00
Shea Levy
2fe3a3c203 Merge branch 'grub' of git://github.com/ts468/nixpkgs
Fix grubTarget on nodev installs
2015-02-20 07:47:06 -05:00
Shea Levy
3e44f99055 Fix grub 1 install 2015-02-19 19:33:17 -05:00
Thomas Strobel
c61ff9b51e Fix grubTarget on nodev installs 2015-02-16 20:19:44 +01:00
William A. Kennington III
1fddcd1e83 grub: Don't remove zfs support if contained in the default binary 2015-02-13 14:40:41 -08:00
Shea Levy
24c0844cfb Fix grub on nodev installs 2015-02-08 22:31:14 -05:00
William A. Kennington III
2a0754ccbc Merge pull request #5994 from ts468/grub
Add 'target' parameter for GRUB installation chain
2015-02-08 14:18:13 -08:00
Bob van der Linden
a3d5f4f3ef nixos: gummiboot: change default to 1000 if boot.loader.timeout is null
When gummiboot.timeout == null, the menu will still be skipped.
When gummiboot.timeout == 0, the menu will also be skipped.
The only way to show the menu 'indefinitely' is to show it a long time.
2015-01-30 10:36:21 +01:00
Bob van der Linden
f93ba51469 nixos: loader: added generic config.boot.loader.timeout option
timeout options of grub and gummiboot will inherit the value of this
option by default.
2015-01-30 09:53:44 +01:00
Thomas Strobel
3767370866 Add target parameter to grub installation chain 2015-01-27 19:46:37 +01:00
Shea Levy
9245516b46 gummiboot-builder.py: run nix with no build-users-group
During install, the bootloader script gets run inside a chroot after the
/etc/group bind-mount is unmounted. Since we're not doing any building,
this should be safe, but really nix should just not care if the group
does not exist when no build is needed.

Fixes #5494
2014-12-29 07:09:10 -05:00
Emery Hemingway
e69f876cca nixos: iPXE client for GRUB
fix bug in grub/install-grub.pl that would replace @bootRoot@ with an invalid string
2014-12-04 12:03:10 +01:00
Franz Pletz
30690d05bc Add cryptodisk support for Grub
Closes #4193
2014-09-24 21:48:55 +01:00
William A. Kennington III
13ca3708b5 Fix #4236 2014-09-23 10:18:05 -07:00
Rickard Nilsson
5be23fe888 nixos/install-grub: Don't run GrubFs(/nix/store) if copyKernels is true 2014-09-23 14:34:44 +02:00
Luca Bruno
dfa6f03ea3 Do not assert absolute path for nodev grub device. Closes #3996 2014-09-08 12:00:34 +02:00
William A. Kennington III
c6bd6d6d89 nixos/grub: Assert devices should be absolute paths 2014-09-04 10:31:39 -07:00
William A. Kennington III
f73f7ccc6e nixos/install-grub: Read correct mountpoints 2014-09-04 10:31:39 -07:00
Michael Raskin
1a0d437bf3 Merge pull request #3944 from joshcartwright/gummiboot-timeout-fix
gummiboot/builder: fix timeout setting when unset
2014-09-04 20:17:44 +04:00
William A. Kennington III
eee8fd89b3 nixos/install-grub: Correct store path for search 2014-09-03 10:01:00 -07:00
Josh Cartwright
626a666da5 gummiboot/builder: fix timeout setting when unset
The gummiboot-builder.py script is expecting the @timeout@ metavar to be
substituted for either an empty string (in the case where a user has
left the timeout unset) or the actual value set in the system
configuration.

However, the config.boot.loader.gummiboot.timeout option defaults to
'null', and due to the way pkgs.substituteAll works, the substitution
for '@timeout@' is _never_ set to the empty string.  This causes the
builder script to put a bogus line into /boot/loader/loader.conf:

   timeout @timeout@

Fix this by explicitly setting 'timeout' to the empty string when it's
unset in the system configuration.

Signed-off-by: Josh Cartwright <joshc@eso.teric.us>
2014-09-03 05:36:45 +02:00
William A. Kennington III
ccc758f414 nixos/install-grub: Fix typo 2014-09-02 18:56:53 -07:00
William A. Kennington III
961e9867b3 nixos/generate-config: Only add store search path when kernels are not copied 2014-09-02 09:16:13 -07:00
William A. Kennington III
9467937639 nixos/install-grub: Only check for /nix to be the mountPoint for the store 2014-09-02 09:16:13 -07:00
William A. Kennington III
61908bdd80 nixos/install-grub: Always copy kernels for different devices 2014-09-02 09:16:13 -07:00
William A. Kennington III
01ab1d57a3 nixos/install-grub: Detect nested btrfs subvolumes 2014-09-02 09:16:13 -07:00
William A. Kennington III
0b66483c9a nixos/install-grub: Store path should be /nix/store not /nix 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
Longrin Wischnewski
196c6260be grub: fix grub merge error 2014-08-31 12:29:13 +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
William A. Kennington III
7d16a429f0 nixos/install-grub: Fix Indentation 2014-08-29 12:19:13 -07:00
William A. Kennington III
cf7f7a5107 nixos/install-grub: Check /boot against /nix/store instead of /nix 2014-08-28 13:35:37 -07:00
William A. Kennington III
0f6079d999 nixos/grub: Fix spacing and correct subvolume detection 2014-08-28 13:35:36 -07:00
William A. Kennington III
4f096c044f nixos/grub: Simplify detection of labels / uuids for provided device names 2014-08-28 13:35:36 -07:00
William A. Kennington III
c02bc3a9de nixos/grub: Fix regex for getting subvolume name in btrfs 2014-08-28 13:35:36 -07:00
William A. Kennington III
3bf22679b3 nixos/grub: Kernels don't need to be copied if we can read the nix store 2014-08-28 13:35:36 -07:00
William A. Kennington III
87d5e457fe nixos/grub: Grub detection is much simpler using subvol show 2014-08-28 13:35:36 -07:00
William A. Kennington III
d4a9645ef0 nixos/grub: Needs mount so add utillinux to bin 2014-08-28 13:35:35 -07:00
William A. Kennington III
8329d12b79 grub: Change fsIdentifier to str from string 2014-08-28 13:35:35 -07:00
William A. Kennington III
769d2dc6bf nixos/grub: Catch errors from command execution 2014-08-28 13:35:35 -07:00
William A. Kennington III
d4e2040099 nixos/grub: Refactor install-grub.pl and correct perl syntax 2014-08-28 13:35:35 -07:00
William A. Kennington III
99b4792554 nixos/grub: Refactor perl script to remove the Switch module 2014-08-28 13:35:35 -07:00
William A. Kennington III
525acb4d4f nixos/grub: Fix typo 2014-08-28 13:35:35 -07:00
William A. Kennington III
70c11772a6 nixos/grub: Fix some silly perl struct accesses 2014-08-28 13:35:35 -07:00
William A. Kennington III
a6e6c85f06 grub: Add support for detecting btrfs subvolumes 2014-08-28 13:35:35 -07:00
William A. Kennington III
fba9f641a8 grub: Add support for forcing devices to be identified with labels or UUIDs 2014-08-28 13:35:35 -07:00
William A. Kennington III
c5bdb469ce Update the grub configuration script to handle more complex filesystem layouts including full zfs / and /boot 2014-08-28 13:35:35 -07:00
William A. Kennington III
02ab48d0ee Enable grub zfsSupport if zfs is built into the initrd 2014-08-28 13:35:34 -07:00
William A. Kennington III
3c6e2fbba9 Add optional zfsSupport to the nixos grub configuration 2014-08-28 13:35:34 -07:00
William A. Kennington III
4f832b5217 Revert "grub: Allow setting the boot root explicitly"
This reverts commit e4630c1d41.
2014-08-28 13:35:34 -07:00
Shea Levy
4061c18c98 Revert "grub: removed orphaned mkOption configurationName"
The configurationName option value is still used by NixOS, this removal
breaks grub users.

This reverts commit bd811d32b4.
2014-08-27 03:26:40 -04:00
Joachim Schiele
bd811d32b4 grub: removed orphaned mkOption configurationName 2014-08-26 19:14:47 +02:00
Shea Levy
e4630c1d41 grub: Allow setting the boot root explicitly
If /boot is a btrfs subvolume, it will be on a different device than /
but not be at the root from grub's perspective. This should be fixed in
a nicer way by #2449, but that can't go into 14.04.
2014-05-01 10:56:55 -04:00
Eelco Dolstra
9bb209a3bd gummiboot: Automatically disable GRUB 2014-04-30 11:47:18 +02:00
Eelco Dolstra
cf53152902 Fix GRUB 2 example
Fixes #1891.
2014-04-20 19:41:15 +02:00
Eelco Dolstra
29027fd1e1 Rewrite ‘with pkgs.lib’ -> ‘with lib’
Using pkgs.lib on the spine of module evaluation is problematic
because the pkgs argument depends on the result of module
evaluation. To prevent an infinite recursion, pkgs and some of the
modules are evaluated twice, which is inefficient. Using ‘with lib’
prevents this problem.
2014-04-14 16:26:48 +02:00
Eelco Dolstra
d2aa2ac494 memtest.nix: Use toString 2014-02-18 19:13:07 +01:00
Bjørn Forsman
48851fa749 nixos/memtest: use docbook formatting
Without this the HTML manual and manpage is quite unreadable (newlines
are squashed so it doesn't look like a list anymore).

(Unfortunately, this makes the source unreadable.)
2014-02-09 13:56:09 +01:00
Ricardo M. Correia
cba2444d11 nixos/memtest: Allow user to specify memtest86 boot parameters 2014-02-09 13:55:37 +01:00
Shea Levy
1e0352f801 Fix gummiboot builder
Signed-off-by: Shea Levy <shea@shealevy.com>
2014-02-05 07:54:11 -05:00
Shea Levy
5e72e36f95 gummiboot-builder.py: Remove old entries before adding new ones
Fixes #1483

Signed-off-by: Shea Levy <shea@shealevy.com>
2014-02-03 17:41:31 -05:00
Shea Levy
b0000b29af gummiboot module: Don't use obsolete environment.nix option
Signed-off-by: Shea Levy <shea@shealevy.com>
2014-01-05 15:53:39 -05:00
Eelco Dolstra
9ee30cd9b5 Add support for lightweight NixOS containers
You can now say:

  systemd.containers.foo.config =
    { services.openssh.enable = true;
      services.openssh.ports = [ 2022 ];
      users.extraUsers.root.openssh.authorizedKeys.keys = [ "ssh-dss ..." ];
    };

which defines a NixOS instance with the given configuration running
inside a lightweight container.

You can also manage the configuration of the container independently
from the host:

  systemd.containers.foo.path = "/nix/var/nix/profiles/containers/foo";

where "path" is a NixOS system profile.  It can be created/updated by
doing:

  $ nix-env --set -p /nix/var/nix/profiles/containers/foo \
      -f '<nixos>' -A system -I nixos-config=foo.nix

The container configuration (foo.nix) should define

  boot.isContainer = true;

to optimise away the building of a kernel and initrd.  This is done
automatically when using the "config" route.

On the host, a lightweight container appears as the service
"container-<name>.service".  The container is like a regular NixOS
(virtual) machine, except that it doesn't have its own kernel.  It has
its own root file system (by default /var/lib/containers/<name>), but
shares the Nix store of the host (as a read-only bind mount).  It also
has access to the network devices of the host.

Currently, if the configuration of the container changes, running
"nixos-rebuild switch" on the host will cause the container to be
rebooted.  In the future we may want to send some message to the
container so that it can activate the new container configuration
without rebooting.

Containers are not perfectly isolated yet.  In particular, the host's
/sys/fs/cgroup is mounted (writable!) in the guest.
2013-11-27 17:14:10 +01:00
Eelco Dolstra
408b8b5725 Add lots of missing option types 2013-10-30 18:47:43 +01:00
Eelco Dolstra
be5d3a59dd Clean up some option examples 2013-10-30 18:47:43 +01:00
Eelco Dolstra
4680af6a93 Add some option types 2013-10-30 14:57:42 +01:00
Eelco Dolstra
862e3dd977 Substitute "types.uniq types.string" -> "types.str" 2013-10-30 14:57:42 +01:00
Eelco Dolstra
9a8516438e Fix NixOps evaluation 2013-10-28 22:45:57 +01:00
Eelco Dolstra
4b1a9dd00b Remove uses of mkFixStrictness
mkFixStrictness is no longer needed, woohoo!
2013-10-28 22:45:55 +01:00
Eelco Dolstra
c4149c7b56 Fix evaluation error in the ISOs 2013-10-24 02:03:10 +02:00
Eelco Dolstra
a3777ba4f9 Remove dependencies on the Nixpkgs location 2013-10-23 20:08:23 +02:00
Eelco Dolstra
8f4c5b05d5 Add a way to define obsolete options that have no replacement 2013-10-23 20:08:22 +02:00
Eelco Dolstra
b33657df03 grub: Make assertion lazier 2013-10-17 13:30:49 +02:00
Shea Levy
a63b4dc555 Remove old efi boot stub bootloader
Signed-off-by: Shea Levy <shea@shealevy.com>
2013-10-10 10:54:35 -04:00
Eelco Dolstra
5c1f8cbc70 Move all of NixOS to nixos/ in preparation of the repository merge 2013-10-10 13:28:20 +02:00