* Move the manual/Rogue from virtual consoles 7/8 to 8/9

respectively so that the X server can run on 7.

svn path=/nixos/branches/modular-nixos/; revision=15924
This commit is contained in:
Eelco Dolstra 2009-06-10 12:53:45 +00:00
parent 135240e05f
commit 262ddf0854
2 changed files with 37 additions and 39 deletions

View File

@ -1,6 +1,6 @@
{pkgs, config, ...}: {pkgs, config, ...}:
# Show the NixOS manual on tty7 # Show the NixOS manual on tty8
# Originally used only by installation CD # Originally used only by installation CD
let let
@ -14,29 +14,23 @@ let
enable = mkOption { enable = mkOption {
default = false; default = false;
description = " description = "
Whether to show the NixOS manual on the tty7 Whether to show the NixOS manual on one of the virtual
consoles.
"; ";
}; };
ttyNumber = mkOption { ttyNumber = mkOption {
default = "7"; default = "8";
description = " description = "
TTY number name to show the manual on Virtual console on which to show the manual.
"; ";
}; };
browserPackage = mkOption { browser = mkOption {
default = pkgs.w3m; default = "${pkgs.w3m}/bin/w3m";
description = " description = ''
Package containing the browser to be used Browser used to show the manual.
"; '';
};
browserCommand = mkOption {
default = "bin/w3m";
description = "
Command (command path is relative to browserPackage) to run the browser
";
}; };
manualFile = mkOption { manualFile = mkOption {
@ -55,7 +49,7 @@ let
in in
let let
inherit (config.services.showManual) enable ttyNumber browserPackage browserCommand manualFile; inherit (config.services.showManual) enable ttyNumber browser manualFile;
realManualFile = realManualFile =
if manualFile == null then if manualFile == null then
@ -88,7 +82,7 @@ mkIf enable {
start on udev start on udev
stop on shutdown stop on shutdown
respawn ${browserPackage}/${browserCommand} ${realManualFile} < /dev/tty${toString ttyNumber} > /dev/tty${toString ttyNumber} 2>&1 respawn ${browser} ${realManualFile} < /dev/tty${toString ttyNumber} > /dev/tty${toString ttyNumber} 2>&1
''; '';
}]; }];

View File

@ -1,29 +1,31 @@
{pkgs, config, ...}: {pkgs, config, ...}:
# Show rogue game on tty8 # Show rogue game on tty9
# Originally used only by installation CD # Originally used only by installation CD
let let
inherit (pkgs.lib) mkOption;
options = {
services = {
rogue = {
enable = mkOption {
default = false;
description = "
Whether to run rogue
";
};
ttyNumber = mkOption {
default = "8";
description = "
TTY number name to show the manual on
";
};
};
};
};
inherit (pkgs.lib) mkOption;
options = {
services.rogue.enable = mkOption {
default = false;
description = ''
Whether to enable the Rogue game on one of the virtual
consoles.
'';
};
services.rogue.ttyNumber = mkOption {
default = "9";
description = ''
Virtual console on which to run Rogue.
'';
};
};
cfg = config.services.rogue; cfg = config.services.rogue;
in in
@ -37,11 +39,13 @@ pkgs.lib.mkIf cfg.enable {
{ name = "rogue"; { name = "rogue";
job = '' job = ''
description "rogue game" description "Rogue dungeon crawling game"
start on udev start on udev
stop on shutdown stop on shutdown
chdir /root
respawn ${pkgs.rogue}/bin/rogue < /dev/tty${toString cfg.ttyNumber} > /dev/tty${toString cfg.ttyNumber} 2>&1 respawn ${pkgs.rogue}/bin/rogue < /dev/tty${toString cfg.ttyNumber} > /dev/tty${toString cfg.ttyNumber} 2>&1
''; '';
}; };