Commit Graph

41 Commits

Author SHA1 Message Date
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