* Put some help text in /etc/issue on the CD.

svn path=/nixos/trunk/; revision=10076
This commit is contained in:
Eelco Dolstra 2008-01-04 17:05:48 +00:00
parent 3abf5072ce
commit 56107c81b0
3 changed files with 49 additions and 22 deletions

View File

@ -83,6 +83,13 @@ rec {
]; ];
}; };
mingetty = {
helpLine = ''
Log in as "root" with an empty password. Press <Alt-F7> for help.
'';
};
}; };
fonts = { fonts = {

View File

@ -11,18 +11,17 @@ let
# !!! ugh, these files shouldn't be created here. # !!! ugh, these files shouldn't be created here.
envConf = pkgs.writeText "environment" " envConf = pkgs.writeText "environment" ''
PATH=${systemPath}/bin:${systemPath}/sbin:${pkgs.openssh}/bin PATH=${systemPath}/bin:${systemPath}/sbin:${pkgs.openssh}/bin
NIX_REMOTE=daemon NIX_REMOTE=daemon
" /* ${pkgs.openssh}/bin is a hack to get remote scp to work */; '' /* ${pkgs.openssh}/bin is a hack to get remote scp to work */;
# Don't indent this file! pamConsoleHandlers = pkgs.writeText "console.handlers" ''
pamConsoleHandlers = pkgs.writeText "console.handlers" "
console consoledevs /dev/tty[0-9][0-9]* :[0-9]\.[0-9] :[0-9] console consoledevs /dev/tty[0-9][0-9]* :[0-9]\.[0-9] :[0-9]
${pkgs.pam_console}/sbin/pam_console_apply lock logfail wait -t tty -s -c ${pamConsolePerms} ${pkgs.pam_console}/sbin/pam_console_apply lock logfail wait -t tty -s -c ${pamConsolePerms}
${pkgs.pam_console}/sbin/pam_console_apply unlock logfail wait -r -t tty -s -c ${pamConsolePerms} ${pkgs.pam_console}/sbin/pam_console_apply unlock logfail wait -r -t tty -s -c ${pamConsolePerms}
"; '';
pamConsolePerms = ./security/console.perms; pamConsolePerms = ./security/console.perms;
@ -64,7 +63,12 @@ import ../helpers/make-etc.nix {
} }
{ # Friendly greeting on the virtual consoles. { # Friendly greeting on the virtual consoles.
source = ./issue; source = pkgs.writeText "issue" ''
${config.services.mingetty.greetingLine}
${config.services.mingetty.helpLine}
'';
target = "issue"; target = "issue";
} }
@ -119,14 +123,14 @@ import ../helpers/make-etc.nix {
} }
{ # Nix configuration. { # Nix configuration.
source = pkgs.writeText "nix.conf" " source = pkgs.writeText "nix.conf" ''
# WARNING: this file is generated. # WARNING: this file is generated.
build-users-group = nixbld build-users-group = nixbld
build-max-jobs = ${toString (config.nix.maxJobs)} build-max-jobs = ${toString (config.nix.maxJobs)}
build-use-chroot = ${if config.nix.useChroot then "true" else "false"} build-use-chroot = ${if config.nix.useChroot then "true" else "false"}
build-chroot-dirs = /dev /proc /bin /etc build-chroot-dirs = /dev /proc /bin /etc
${config.nix.extraOptions} ${config.nix.extraOptions}
"; '';
target = "nix.conf"; # will be symlinked from /nix/etc/nix/nix.conf in activate-configuration.sh. target = "nix.conf"; # will be symlinked from /nix/etc/nix/nix.conf in activate-configuration.sh.
} }
@ -134,13 +138,13 @@ import ../helpers/make-etc.nix {
# Configuration for ssmtp. # Configuration for ssmtp.
++ optional config.networking.defaultMailServer.directDelivery { ++ optional config.networking.defaultMailServer.directDelivery {
source = let cfg = config.networking.defaultMailServer; in pkgs.writeText "ssmtp.conf" " source = let cfg = config.networking.defaultMailServer; in pkgs.writeText "ssmtp.conf" ''
mailhub=${cfg.hostName} mailhub=${cfg.hostName}
${if cfg.domain != "" then "rewriteDomain=${cfg.domain}" else ""} ${if cfg.domain != "" then "rewriteDomain=${cfg.domain}" else ""}
UseTLS=${if cfg.useTLS then "YES" else "NO"} UseTLS=${if cfg.useTLS then "YES" else "NO"}
UseSTARTTLS=${if cfg.useSTARTTLS then "YES" else "NO"} UseSTARTTLS=${if cfg.useSTARTTLS then "YES" else "NO"}
#Debug=YES #Debug=YES
"; '';
target = "ssmtp/ssmtp.conf"; target = "ssmtp/ssmtp.conf";
} }

View File

@ -575,6 +575,22 @@
"; ";
}; };
greetingLine = mkOption {
default = ''<<< Welcome to NixOS (\m) - Kernel \r (\l) >>>'';
description = "
Welcome line printed by mingetty.
";
};
helpLine = mkOption {
default = "";
description = "
Help line printed by mingetty below the welcome line.
Used by the installation CD to give some hints on
how to proceed.
";
};
}; };