diff --git a/configuration/rescue-cd.nix b/configuration/rescue-cd.nix
index 6ec96175645..5640777bada 100644
--- a/configuration/rescue-cd.nix
+++ b/configuration/rescue-cd.nix
@@ -14,6 +14,7 @@ rec {
readOnlyRoot = true;
# The label used to identify the installation CD.
rootLabel = "NIXOS";
+ extraTTYs = [7 8]; # manual, rogue
};
services = {
@@ -43,6 +44,15 @@ rec {
";
}
+ # Show the NixOS manual on tty7.
+ { name = "manual";
+ job = "
+ start on udev
+ stop on shutdown
+ respawn ${pkgs.w3m}/bin/w3m ${import ../doc/manual}/manual.html < /dev/tty7 > /dev/tty7 2>&1
+ ";
+ }
+
# Allow the user to do something useful on tty8 while waiting
# for the installation to finish.
{ name = "rogue";
@@ -57,6 +67,13 @@ rec {
# And a background to go with that.
ttyBackgrounds = {
specificThemes = [
+ { tty = 7;
+ # Theme is GPL according to http://kde-look.org/content/show.php/Green?content=58501.
+ theme = pkgs.fetchurl {
+ url = http://www.kde-look.org/CONTENT/content-files/58501-green.tar.gz;
+ sha256 = "0sdykpziij1f3w4braq8r8nqg4lnsd7i7gi1k5d7c31m2q3b9a7r";
+ };
+ }
{ tty = 8;
theme = pkgs.fetchurl {
url = http://www.bootsplash.de/files/themes/Theme-GNU.tar.bz2;
@@ -86,6 +103,7 @@ rec {
extraPackages = pkgs: [
pkgs.vim
pkgs.subversion # for nixos-checkout
+ pkgs.w3m # needed for the manual anyway
];
};
@@ -99,7 +117,7 @@ rec {
pkgs = system.pkgs;
-
+
# Since the CD is read-only, the mount points must be on disk.
cdMountPoints = pkgs.runCommand "mount-points" {} "
@@ -176,10 +194,7 @@ rec {
{ source = pkgs.memtest86 + "/memtest.bin";
target = "boot/memtest.bin";
}
- { source = pkgs.fetchurl {
- url = http://www.gnome-look.org/CONTENT/content-files/36909-soft-tux.xpm.gz;
- sha256 = "14kqdx2lfqvh40h6fjjzqgff1mwk74dmbjvmqphi6azzra7z8d59";
- };
+ { source = system.config.boot.grubSplashImage;
target = "boot/background.xpm.gz";
}
{ source = cdMountPoints;
diff --git a/system/options.nix b/system/options.nix
index e99ab54d2b0..177d223d9f6 100644
--- a/system/options.nix
+++ b/system/options.nix
@@ -234,6 +234,19 @@
";
};
+ extraTTYs = mkOption {
+ default = [];
+ example = [8 9];
+ description = "
+ Tty (virtual console) devices, in addition to the consoles on
+ which mingetty and syslogd run, that must be initialised.
+ Only useful if you have some program that you want to run on
+ some fixed console. For example, the NixOS installation CD
+ opens the manual in a web browser on console 7, so it sets
+ to [7].
+ ";
+ };
+
};
diff --git a/upstart-jobs/default.nix b/upstart-jobs/default.nix
index 24511ddb72e..6fceee08cfe 100644
--- a/upstart-jobs/default.nix
+++ b/upstart-jobs/default.nix
@@ -9,8 +9,9 @@ let
optional = cond: service: pkgs.lib.optional cond (makeJob service);
requiredTTYs =
- (config.services.mingetty.ttys)
- ++ [10] /* !!! sync with syslog.conf */ ;
+ config.services.mingetty.ttys
+ ++ config.boot.extraTTYs
+ ++ [config.services.syslogd.tty];
jobs = map makeJob [