Added module aggregation, also changed non-root shell prompt colour to green

svn path=/nixos/trunk/; revision=10084
This commit is contained in:
Michael Raskin 2008-01-06 18:45:13 +00:00
parent 9e00dfe107
commit 5a29acf6a0
4 changed files with 41 additions and 8 deletions

View File

@ -14,6 +14,7 @@ rec {
readOnlyRoot = true; readOnlyRoot = true;
# The label used to identify the installation CD. # The label used to identify the installation CD.
rootLabel = "NIXOS"; rootLabel = "NIXOS";
extraTTYs = [7 8]; # manual, rogue
}; };
services = { services = {
@ -45,6 +46,15 @@ rec {
"; ";
} }
# Show the NixOS manual on tty7.
{ name = "manual";
job = "
start on udev
stop on shutdown
respawn ${pkgs.w3m}/bin/w3m ${manual} < /dev/tty7 > /dev/tty7 2>&1
";
}
# Allow the user to do something useful on tty8 while waiting # Allow the user to do something useful on tty8 while waiting
# for the installation to finish. # for the installation to finish.
{ name = "rogue"; { name = "rogue";
@ -59,6 +69,13 @@ rec {
# And a background to go with that. # And a background to go with that.
ttyBackgrounds = { ttyBackgrounds = {
specificThemes = [ 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; { tty = 8;
theme = pkgs.fetchurl { theme = pkgs.fetchurl {
url = http://www.bootsplash.de/files/themes/Theme-GNU.tar.bz2; url = http://www.bootsplash.de/files/themes/Theme-GNU.tar.bz2;
@ -67,6 +84,13 @@ rec {
} }
]; ];
}; };
mingetty = {
helpLine = ''
Log in as "root" with an empty password. Press <Alt-F7> for help.
'';
};
}; };
@ -151,7 +175,15 @@ rec {
pkgs = system.pkgs; pkgs = system.pkgs;
# The NixOS manual, with a backward compatibility hack for Nix <=
# 0.11 (you won't get the manual).
manual =
if builtins ? unsafeDiscardStringContext
then "${import ../doc/manual}/manual.html"
else pkgs.writeText "dummy-manual" "Manual not included in this build!";
# Since the CD is read-only, the mount points must be on disk. # Since the CD is read-only, the mount points must be on disk.
cdMountPoints = pkgs.runCommand "mount-points" {} " cdMountPoints = pkgs.runCommand "mount-points" {} "
@ -216,7 +248,7 @@ rec {
# Create an ISO image containing the Grub boot loader, the kernel, # Create an ISO image containing the Grub boot loader, the kernel,
# the initrd produced above, and the closure of the stage 2 init. # the initrd produced above, and the closure of the stage 2 init.
rescueCD = import ../helpers/make-iso9660-image.nix { rescueCD = import ../helpers/make-iso9660-image.nix {
inherit (pkgs) stdenv perl cdrtools; inherit (pkgs) stdenv perl cdrkit;
isoName = "nixos-${platform}.iso"; isoName = "nixos-${platform}.iso";
# Single files to be copied to fixed locations on the CD. # Single files to be copied to fixed locations on the CD.
@ -236,10 +268,7 @@ rec {
{ source = pkgs.memtest86 + "/memtest.bin"; { source = pkgs.memtest86 + "/memtest.bin";
target = "boot/memtest.bin"; target = "boot/memtest.bin";
} }
{ source = pkgs.fetchurl { { source = system.config.boot.grubSplashImage;
url = http://www.gnome-look.org/CONTENT/content-files/36909-soft-tux.xpm.gz;
sha256 = "14kqdx2lfqvh40h6fjjzqgff1mwk74dmbjvmqphi6azzra7z8d59";
};
target = "boot/background.xpm.gz"; target = "boot/background.xpm.gz";
} }
{ source = cdMountPoints; { source = cdMountPoints;

View File

@ -1,5 +1,6 @@
{ config, pkgs, upstartJobs, systemPath, wrapperDir { config, pkgs, upstartJobs, systemPath, wrapperDir
, defaultShell, extraEtc, nixEnvVars , defaultShell, extraEtc, nixEnvVars
, kernel ? null
}: }:
let let
@ -25,7 +26,6 @@ let
pamConsolePerms = ./security/console.perms; pamConsolePerms = ./security/console.perms;
in in
@ -109,10 +109,12 @@ import ../helpers/make-etc.nix {
source = pkgs.substituteAll { source = pkgs.substituteAll {
src = ./profile.sh; src = ./profile.sh;
inherit systemPath wrapperDir; inherit systemPath wrapperDir;
inherit (pkgs) systemKernel glibc; inherit (pkgs) glibc;
timeZone = config.time.timeZone; timeZone = config.time.timeZone;
defaultLocale = config.i18n.defaultLocale; defaultLocale = config.i18n.defaultLocale;
inherit nixEnvVars; inherit nixEnvVars;
systemKernel = (if kernel == null then
pkgs.systemKernel else kernel);
}; };
target = "profile"; target = "profile";
} }

View File

@ -11,6 +11,7 @@ export EDITOR=nano
# A nice prompt. # A nice prompt.
PROMPT_COLOR="1;31m" PROMPT_COLOR="1;31m"
let $UID && PROMPT_COLOR="1;32m"
PS1="\n\[\033[$PROMPT_COLOR\][\u@\h:\w]$\[\033[0m\] " PS1="\n\[\033[$PROMPT_COLOR\][\u@\h:\w]$\[\033[0m\] "
if test "x$TERM" == "xxterm"; then if test "x$TERM" == "xxterm"; then
PS1="\033]2;\h:\u:\w\007$PS1" PS1="\033]2;\h:\u:\w\007$PS1"

View File

@ -172,6 +172,7 @@ rec {
etc = import ../etc/default.nix { etc = import ../etc/default.nix {
inherit config pkgs upstartJobs systemPath wrapperDir inherit config pkgs upstartJobs systemPath wrapperDir
defaultShell nixEnvVars; defaultShell nixEnvVars;
inherit kernel;
extraEtc = pkgs.lib.concatLists (map (job: job.extraEtc) upstartJobs.jobs); extraEtc = pkgs.lib.concatLists (map (job: job.extraEtc) upstartJobs.jobs);
}; };