nixpkgs/modules/profiles/headless.nix
Eelco Dolstra a9a507eede * On headless systems, disable the emergency shell and redirect
mountall output to the standard Upstart job log file
  (/var/log/upstart/mountall).

svn path=/nixos/trunk/; revision=34138
2012-05-16 15:08:44 +00:00

28 lines
844 B
Nix
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Common configuration for headless machines (e.g., Amazon EC2
# instances).
{ config, pkgs, ... }:
with pkgs.lib;
{
sound.enable = false;
boot.vesa = false;
boot.initrd.enableSplashScreen = false;
services.ttyBackgrounds.enable = false;
services.mingetty.ttys = [ ];
# Since we can't manually respond to a panic, just reboot.
boot.kernelParams = [ "panic=1" "stage1panic=1" ];
# Since we don't have an (interactive) console, disable the
# emergency shell (started if mountall fails).
jobs."mount-failed".script = mkOverride 50
''
${pkgs.utillinux}/bin/logger -p user.emerg -t mountall "filesystem $DEVICE could not be mounted on $MOUNTPOINT"
'';
# Likewise, redirect mountall output from the console to the default
# Upstart job log file.
jobs."mountall".console = mkOverride 50 "";
}