2011-11-08 19:58:59 +04:00
|
|
|
# Provide a basic configuration for installation devices like CDs.
|
2014-04-14 18:26:48 +04:00
|
|
|
{ config, lib, ... }:
|
2010-09-25 13:32:43 +04:00
|
|
|
|
2014-04-14 18:26:48 +04:00
|
|
|
with lib;
|
2010-09-25 13:32:43 +04:00
|
|
|
|
2010-09-25 13:32:48 +04:00
|
|
|
{
|
2013-07-03 15:58:38 +04:00
|
|
|
imports =
|
|
|
|
[ # Enable devices which are usually scanned, because we don't know the
|
|
|
|
# target system.
|
|
|
|
../installer/scan/detected.nix
|
|
|
|
../installer/scan/not-detected.nix
|
2010-09-25 13:32:52 +04:00
|
|
|
|
2013-07-03 15:58:38 +04:00
|
|
|
# Allow "nixos-rebuild" to work properly by providing
|
|
|
|
# /etc/nixos/configuration.nix.
|
|
|
|
./clone-config.nix
|
|
|
|
];
|
2010-09-25 13:32:48 +04:00
|
|
|
|
|
|
|
config = {
|
|
|
|
|
|
|
|
# Show the manual.
|
|
|
|
services.nixosManual.showManual = true;
|
|
|
|
|
|
|
|
# Let the user play Rogue on TTY 8 during the installation.
|
|
|
|
services.rogue.enable = true;
|
|
|
|
|
|
|
|
# Disable some other stuff we don't need.
|
|
|
|
security.sudo.enable = false;
|
|
|
|
|
|
|
|
# Include only the en_US locale. This saves 75 MiB or so compared to
|
|
|
|
# the full glibcLocales package.
|
|
|
|
i18n.supportedLocales = ["en_US.UTF-8/UTF-8" "en_US/ISO-8859-1"];
|
|
|
|
|
|
|
|
# Some more help text.
|
|
|
|
services.mingetty.helpLine =
|
|
|
|
''
|
2011-09-14 22:20:50 +04:00
|
|
|
|
2010-09-25 13:32:48 +04:00
|
|
|
Log in as "root" with an empty password. ${
|
2013-01-22 15:52:13 +04:00
|
|
|
optionalString config.services.xserver.enable
|
|
|
|
"Type `start display-manager' to\nstart the graphical user interface."}
|
2010-09-25 13:32:48 +04:00
|
|
|
'';
|
2010-09-25 13:32:43 +04:00
|
|
|
|
2013-07-09 17:59:57 +04:00
|
|
|
# Allow sshd to be started manually through "start sshd".
|
2010-09-25 13:32:48 +04:00
|
|
|
services.openssh.enable = true;
|
2013-07-09 18:12:34 +04:00
|
|
|
systemd.services.sshd.wantedBy = mkOverride 50 [];
|
2010-09-25 13:32:43 +04:00
|
|
|
|
2010-09-25 13:32:48 +04:00
|
|
|
# Enable wpa_supplicant, but don't start it by default.
|
2012-03-05 01:15:34 +04:00
|
|
|
networking.wireless.enable = true;
|
2014-04-14 18:26:48 +04:00
|
|
|
jobs.wpa_supplicant.startOn = mkOverride 50 "";
|
2012-04-23 04:41:37 +04:00
|
|
|
|
|
|
|
# Tell the Nix evaluator to garbage collect more aggressively.
|
|
|
|
# This is desirable in memory-constrained environments that don't
|
|
|
|
# (yet) have swap set up.
|
2013-09-24 01:03:21 +04:00
|
|
|
environment.variables.GC_INITIAL_HEAP_SIZE = "100000";
|
2013-09-18 07:18:34 +04:00
|
|
|
|
2010-09-25 13:32:48 +04:00
|
|
|
};
|
|
|
|
}
|