2009-05-27 08:14:06 +00:00
|
|
|
# This module builds the initial ramdisk, which contains an init
|
|
|
|
# script that performs the first stage of booting the system: it loads
|
|
|
|
# the modules necessary to mount the root file system, then calls the
|
|
|
|
# init in the root file system to start the second boot stage.
|
2006-11-02 22:48:01 +00:00
|
|
|
|
2009-12-15 16:38:20 +00:00
|
|
|
{ config, pkgs, ... }:
|
2008-11-23 01:29:20 +00:00
|
|
|
|
2010-06-01 16:38:42 +00:00
|
|
|
with pkgs.lib;
|
2009-05-27 09:46:50 +00:00
|
|
|
|
2010-06-01 16:38:42 +00:00
|
|
|
let
|
2009-05-27 09:46:50 +00:00
|
|
|
|
2013-01-16 12:17:57 +00:00
|
|
|
udev = config.systemd.package;
|
2012-08-14 19:31:15 +00:00
|
|
|
|
2009-05-27 09:46:50 +00:00
|
|
|
options = {
|
|
|
|
|
|
|
|
boot.resumeDevice = mkOption {
|
|
|
|
default = "";
|
|
|
|
example = "0:0";
|
|
|
|
description = "
|
2011-08-24 21:24:39 +00:00
|
|
|
Device for manual resume attempt during boot. Looks like
|
2009-05-27 09:46:50 +00:00
|
|
|
major:minor. ls -l /dev/SWAP_PARTION shows them.
|
|
|
|
";
|
|
|
|
};
|
|
|
|
|
|
|
|
boot.initrd.enableSplashScreen = mkOption {
|
|
|
|
default = true;
|
|
|
|
description = "
|
|
|
|
Whether to show a nice splash screen while booting.
|
|
|
|
";
|
|
|
|
};
|
2009-06-11 16:04:03 +00:00
|
|
|
|
2009-06-15 16:47:37 +00:00
|
|
|
boot.initrd.checkJournalingFS = mkOption {
|
|
|
|
default = true;
|
|
|
|
type = types.bool;
|
|
|
|
description = ''
|
|
|
|
Whether to run fsck on journaling filesystems such as ext3.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2012-03-13 13:26:21 +00:00
|
|
|
boot.initrd.mdadmConf = mkOption {
|
|
|
|
default = "";
|
|
|
|
type = with types; string;
|
|
|
|
description = ''
|
|
|
|
Contents of /etc/mdadm.conf at initrd.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2011-12-28 21:46:45 +00:00
|
|
|
boot.initrd.preLVMCommands = mkOption {
|
|
|
|
default = "";
|
2011-12-29 00:51:35 +00:00
|
|
|
type = with types; string;
|
2011-12-28 21:46:45 +00:00
|
|
|
description = ''
|
|
|
|
Shell commands to be executed immediately before lvm discovery.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2009-06-18 16:47:00 +00:00
|
|
|
boot.initrd.postDeviceCommands = mkOption {
|
|
|
|
default = "";
|
2011-12-29 00:51:35 +00:00
|
|
|
type = with types; string;
|
2009-06-18 16:47:00 +00:00
|
|
|
description = ''
|
|
|
|
Shell commands to be executed immediately after stage 1 of the
|
|
|
|
boot has loaded kernel modules and created device nodes in
|
|
|
|
/dev.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2009-06-18 16:03:18 +00:00
|
|
|
boot.initrd.postMountCommands = mkOption {
|
|
|
|
default = "";
|
2011-12-29 00:51:35 +00:00
|
|
|
type = with types; string;
|
2009-06-18 16:03:18 +00:00
|
|
|
description = ''
|
|
|
|
Shell commands to be executed immediately after the stage 1
|
2009-06-18 16:47:00 +00:00
|
|
|
filesystems have been mounted.
|
2009-06-18 16:03:18 +00:00
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2009-06-19 15:19:56 +00:00
|
|
|
boot.initrd.extraUtilsCommands = mkOption {
|
2009-12-15 16:38:20 +00:00
|
|
|
internal = true;
|
2009-06-19 15:19:56 +00:00
|
|
|
default = "";
|
2011-12-29 00:51:35 +00:00
|
|
|
type = with types; string;
|
2009-06-19 15:19:56 +00:00
|
|
|
description = ''
|
|
|
|
Shell commands to be executed in the builder of the
|
|
|
|
extra-utils derivation. This can be used to provide
|
|
|
|
additional utilities in the initial ramdisk.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2011-12-28 21:46:35 +00:00
|
|
|
boot.initrd.extraUtilsCommandsTest = mkOption {
|
|
|
|
internal = true;
|
|
|
|
default = "";
|
2011-12-29 00:51:35 +00:00
|
|
|
type = with types; string;
|
2011-12-28 21:46:35 +00:00
|
|
|
description = ''
|
|
|
|
Shell commands to be executed in the builder of the
|
|
|
|
extra-utils derivation after patchelf has done its
|
|
|
|
job. This can be used to test additional utilities
|
|
|
|
copied in extraUtilsCommands.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
2009-06-11 16:04:03 +00:00
|
|
|
fileSystems = mkOption {
|
|
|
|
options.neededForBoot = mkOption {
|
|
|
|
default = false;
|
2009-06-14 11:08:44 +00:00
|
|
|
type = types.bool;
|
2012-11-02 17:02:12 +00:00
|
|
|
description = ''
|
|
|
|
If set, this file system will be mounted in the initial
|
|
|
|
ramdisk. By default, this applies to the root file system
|
|
|
|
and to the file system containing
|
|
|
|
<filename>/nix/store</filename>.
|
|
|
|
'';
|
2009-06-11 16:04:03 +00:00
|
|
|
};
|
|
|
|
};
|
2011-08-24 21:24:39 +00:00
|
|
|
|
2009-05-27 09:46:50 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-11-23 01:29:20 +00:00
|
|
|
kernelPackages = config.boot.kernelPackages;
|
|
|
|
modulesTree = config.system.modulesTree;
|
2008-08-08 17:34:30 +00:00
|
|
|
|
2006-11-12 18:48:47 +00:00
|
|
|
|
2008-08-08 17:34:30 +00:00
|
|
|
# Determine the set of modules that we need to mount the root FS.
|
|
|
|
modulesClosure = pkgs.makeModulesClosure {
|
2009-12-15 16:38:20 +00:00
|
|
|
rootModules = config.boot.initrd.availableKernelModules ++ config.boot.initrd.kernelModules;
|
2008-08-08 17:34:30 +00:00
|
|
|
kernel = modulesTree;
|
2009-12-15 16:38:20 +00:00
|
|
|
allowMissing = true;
|
2008-08-08 17:34:30 +00:00
|
|
|
};
|
2008-01-24 16:56:09 +00:00
|
|
|
|
2006-11-13 11:41:27 +00:00
|
|
|
|
2010-06-01 16:38:42 +00:00
|
|
|
enableSplashScreen =
|
2011-11-08 19:43:15 +00:00
|
|
|
config.boot.vesa && config.boot.initrd.enableSplashScreen && kernelPackages.splashutils != null;
|
2010-06-01 16:38:42 +00:00
|
|
|
|
2012-08-30 16:31:45 +00:00
|
|
|
needsCifsUtils = kernelPackages.kernel ? features
|
|
|
|
&& kernelPackages.kernel.features ? needsCifsUtils
|
|
|
|
&& kernelPackages.kernel.features.needsCifsUtils
|
|
|
|
&& any (fs: fs.fsType == "cifs") fileSystems;
|
|
|
|
|
|
|
|
busybox = if needsCifsUtils
|
|
|
|
then pkgs.busybox.override {
|
|
|
|
extraConfig = ''
|
|
|
|
CONFIG_FEATURE_MOUNT_CIFS n
|
|
|
|
CONFIG_FEATURE_MOUNT_HELPERS y
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
else pkgs.busybox;
|
|
|
|
|
2010-06-01 16:38:42 +00:00
|
|
|
|
2009-02-22 16:08:13 +00:00
|
|
|
# Some additional utilities needed in stage 1, like mount, lvm, fsck
|
|
|
|
# etc. We don't want to bring in all of those packages, so we just
|
|
|
|
# copy what we need. Instead of using statically linked binaries,
|
|
|
|
# we just copy what we need from Glibc and use patchelf to make it
|
|
|
|
# work.
|
2008-08-08 17:34:30 +00:00
|
|
|
extraUtils = pkgs.runCommand "extra-utils"
|
|
|
|
{ buildInputs = [pkgs.nukeReferences];
|
2012-05-21 19:26:07 +00:00
|
|
|
allowedReferences = [ "out" ]; # prevent accidents like glibc being included in the initrd
|
2009-09-23 20:50:48 +00:00
|
|
|
doublePatchelf = (pkgs.stdenv.system == "armv5tel-linux");
|
2008-08-08 17:34:30 +00:00
|
|
|
}
|
|
|
|
''
|
|
|
|
ensureDir $out/bin
|
2009-02-22 16:08:13 +00:00
|
|
|
ensureDir $out/lib
|
2011-08-24 21:24:39 +00:00
|
|
|
|
2009-02-22 16:08:13 +00:00
|
|
|
# Copy what we need from Glibc.
|
2010-08-21 18:23:55 +00:00
|
|
|
cp -pv ${pkgs.glibc}/lib/ld*.so.? $out/lib
|
2010-05-15 21:28:31 +00:00
|
|
|
cp -pv ${pkgs.glibc}/lib/libc.so.* $out/lib
|
2012-05-21 19:26:07 +00:00
|
|
|
cp -pv ${pkgs.glibc}/lib/libm.so.* $out/lib
|
2010-05-15 21:28:31 +00:00
|
|
|
cp -pv ${pkgs.glibc}/lib/libpthread.so.* $out/lib
|
|
|
|
cp -pv ${pkgs.glibc}/lib/librt.so.* $out/lib
|
|
|
|
cp -pv ${pkgs.glibc}/lib/libdl.so.* $out/lib
|
|
|
|
cp -pv ${pkgs.gcc.gcc}/lib*/libgcc_s.so.* $out/lib
|
2009-02-22 16:08:13 +00:00
|
|
|
|
2012-05-21 19:26:07 +00:00
|
|
|
# Copy BusyBox.
|
2012-08-30 16:31:45 +00:00
|
|
|
cp -rvd ${busybox}/{bin,sbin} $out/
|
2012-05-21 19:26:07 +00:00
|
|
|
chmod -R u+w $out
|
|
|
|
|
2009-02-22 16:08:13 +00:00
|
|
|
# Copy some utillinux stuff.
|
2012-05-21 19:26:07 +00:00
|
|
|
cp -v ${pkgs.utillinux}/sbin/blkid $out/bin
|
2010-05-15 21:28:31 +00:00
|
|
|
cp -pdv ${pkgs.utillinux}/lib/libblkid*.so.* $out/lib
|
|
|
|
cp -pdv ${pkgs.utillinux}/lib/libuuid*.so.* $out/lib
|
2012-08-14 19:31:15 +00:00
|
|
|
|
2010-01-10 19:00:29 +00:00
|
|
|
# Copy dmsetup and lvm.
|
2010-05-15 21:28:31 +00:00
|
|
|
cp -v ${pkgs.lvm2}/sbin/dmsetup $out/bin/dmsetup
|
|
|
|
cp -v ${pkgs.lvm2}/sbin/lvm $out/bin/lvm
|
|
|
|
cp -v ${pkgs.lvm2}/lib/libdevmapper.so.*.* $out/lib
|
2013-01-08 14:35:21 +00:00
|
|
|
cp -v ${pkgs.systemd}/lib/libsystemd-daemon.so.* $out/lib
|
2009-02-22 16:08:13 +00:00
|
|
|
|
2009-03-31 09:27:11 +00:00
|
|
|
# Add RAID mdadm tool.
|
2010-05-15 21:28:31 +00:00
|
|
|
cp -v ${pkgs.mdadm}/sbin/mdadm $out/bin/mdadm
|
2009-03-29 10:59:13 +00:00
|
|
|
|
2009-02-22 16:08:13 +00:00
|
|
|
# Copy udev.
|
2012-08-14 19:31:15 +00:00
|
|
|
cp -v ${udev}/lib/systemd/systemd-udevd ${udev}/bin/udevadm $out/bin
|
|
|
|
cp -v ${udev}/lib/udev/*_id $out/bin
|
|
|
|
cp -pdv ${udev}/lib/libudev.so.* $out/lib
|
|
|
|
cp -v ${pkgs.kmod}/lib/libkmod.so.* $out/lib
|
|
|
|
cp -v ${pkgs.acl}/lib/libacl.so.* $out/lib
|
|
|
|
cp -v ${pkgs.attr}/lib/libattr.so.* $out/lib
|
2011-08-24 21:24:39 +00:00
|
|
|
|
2009-12-15 16:38:20 +00:00
|
|
|
# Copy modprobe.
|
2012-05-21 19:26:07 +00:00
|
|
|
cp -v ${pkgs.module_init_tools}/sbin/modprobe $out/bin/modprobe
|
2009-12-15 16:38:20 +00:00
|
|
|
|
2010-06-01 16:38:42 +00:00
|
|
|
# Maybe copy splashutils.
|
|
|
|
${optionalString enableSplashScreen ''
|
|
|
|
cp ${kernelPackages.splashutils}/${kernelPackages.splashutils.helperName} $out/bin/splash_helper
|
|
|
|
''}
|
|
|
|
|
2012-08-30 16:31:45 +00:00
|
|
|
# Maybe copy cifs utils
|
|
|
|
${optionalString needsCifsUtils ''
|
|
|
|
cp -v ${pkgs.cifs_utils}/sbin/mount.cifs $out/bin
|
|
|
|
''}
|
|
|
|
|
2009-06-19 15:19:56 +00:00
|
|
|
${config.boot.initrd.extraUtilsCommands}
|
|
|
|
|
2012-05-21 19:26:07 +00:00
|
|
|
# Strip binaries further than normal.
|
|
|
|
chmod -R u+w $out
|
|
|
|
stripDirs "lib bin" "-s"
|
|
|
|
|
2009-02-22 16:08:13 +00:00
|
|
|
# Run patchelf to make the programs refer to the copied libraries.
|
|
|
|
for i in $out/bin/* $out/lib/*; do if ! test -L $i; then nuke-refs $i; fi; done
|
|
|
|
|
|
|
|
for i in $out/bin/*; do
|
|
|
|
if ! test -L $i; then
|
|
|
|
echo "patching $i..."
|
2010-08-21 18:23:55 +00:00
|
|
|
patchelf --set-interpreter $out/lib/ld*.so.? --set-rpath $out/lib $i || true
|
2009-12-15 16:38:20 +00:00
|
|
|
if [ -n "$doublePatchelf" ]; then
|
2010-08-21 18:23:55 +00:00
|
|
|
patchelf --set-interpreter $out/lib/ld*.so.? --set-rpath $out/lib $i || true
|
2009-09-23 20:50:48 +00:00
|
|
|
fi
|
2009-02-22 16:08:13 +00:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
# Make sure that the patchelf'ed binaries still work.
|
|
|
|
echo "testing patched programs..."
|
2012-05-21 19:26:07 +00:00
|
|
|
$out/bin/ash -c 'echo hello world' | grep "hello world"
|
2009-02-22 16:08:13 +00:00
|
|
|
export LD_LIBRARY_PATH=$out/lib
|
2012-05-21 19:26:07 +00:00
|
|
|
$out/bin/mount --help 2>&1 | grep "BusyBox"
|
2009-02-22 16:08:13 +00:00
|
|
|
$out/bin/udevadm --version
|
2010-05-15 21:28:31 +00:00
|
|
|
$out/bin/dmsetup --version 2>&1 | tee -a $out/log | grep "version:"
|
2010-07-22 22:45:24 +00:00
|
|
|
LVM_SYSTEM_DIR=$out $out/bin/lvm version 2>&1 | tee -a $out/log | grep "LVM"
|
2009-03-31 09:27:11 +00:00
|
|
|
$out/bin/mdadm --version
|
2011-12-28 21:46:35 +00:00
|
|
|
|
|
|
|
${config.boot.initrd.extraUtilsCommandsTest}
|
2008-08-08 17:34:30 +00:00
|
|
|
''; # */
|
2011-08-24 21:24:39 +00:00
|
|
|
|
2006-11-02 22:48:01 +00:00
|
|
|
|
2008-08-08 17:34:30 +00:00
|
|
|
# The initrd only has to mount / or any FS marked as necessary for
|
2011-10-30 15:19:58 +00:00
|
|
|
# booting (such as the FS containing /nix/store, or an FS needed for
|
2008-08-08 17:34:30 +00:00
|
|
|
# mounting /, like / on a loopback).
|
2010-06-01 16:38:42 +00:00
|
|
|
fileSystems = filter
|
2012-11-02 17:02:12 +00:00
|
|
|
(fs: fs.mountPoint == "/" || fs.mountPoint == "/nix" || fs.mountPoint == "/nix/store" || fs.neededForBoot)
|
|
|
|
(attrValues config.fileSystems);
|
2007-02-06 16:53:36 +00:00
|
|
|
|
2008-08-08 22:44:45 +00:00
|
|
|
|
|
|
|
udevRules = pkgs.stdenv.mkDerivation {
|
|
|
|
name = "udev-rules";
|
|
|
|
buildCommand = ''
|
|
|
|
ensureDir $out
|
2011-02-16 14:38:52 +00:00
|
|
|
|
|
|
|
echo 'ENV{LD_LIBRARY_PATH}="${extraUtils}/lib"' > $out/00-env.rules
|
2011-08-24 21:24:39 +00:00
|
|
|
|
2012-08-14 19:31:15 +00:00
|
|
|
cp -v ${udev}/lib/udev/rules.d/60-cdrom_id.rules $out/
|
|
|
|
cp -v ${udev}/lib/udev/rules.d/60-persistent-storage.rules $out/
|
|
|
|
cp -v ${udev}/lib/udev/rules.d/80-drivers.rules $out/
|
2011-08-24 21:24:39 +00:00
|
|
|
cp -v ${pkgs.lvm2}/lib/udev/rules.d/*.rules $out/
|
|
|
|
cp -v ${pkgs.mdadm}/lib/udev/rules.d/*.rules $out/
|
2009-08-19 16:48:28 +00:00
|
|
|
|
|
|
|
for i in $out/*.rules; do
|
|
|
|
substituteInPlace $i \
|
|
|
|
--replace ata_id ${extraUtils}/bin/ata_id \
|
|
|
|
--replace scsi_id ${extraUtils}/bin/scsi_id \
|
|
|
|
--replace cdrom_id ${extraUtils}/bin/cdrom_id \
|
2012-08-16 19:37:13 +00:00
|
|
|
--replace ${pkgs.utillinux}/sbin/blkid ${extraUtils}/bin/blkid \
|
2009-12-15 16:38:20 +00:00
|
|
|
--replace /sbin/blkid ${extraUtils}/bin/blkid \
|
2012-08-14 19:31:15 +00:00
|
|
|
--replace ${pkgs.lvm2}/sbin ${extraUtils}/bin \
|
2010-05-16 20:40:04 +00:00
|
|
|
--replace /sbin/mdadm ${extraUtils}/bin/mdadm
|
2009-08-19 16:48:28 +00:00
|
|
|
done
|
2011-02-16 16:48:34 +00:00
|
|
|
|
|
|
|
# Work around a bug in QEMU, which doesn't implement the "READ
|
|
|
|
# DISC INFORMATION" SCSI command:
|
|
|
|
# https://bugzilla.redhat.com/show_bug.cgi?id=609049
|
|
|
|
# As a result, `cdrom_id' doesn't print
|
|
|
|
# ID_CDROM_MEDIA_TRACK_COUNT_DATA, which in turn prevents the
|
|
|
|
# /dev/disk/by-label symlinks from being created. We need these
|
|
|
|
# in the NixOS installation CD, so use ID_CDROM_MEDIA in the
|
|
|
|
# corresponding udev rules for now. This was the behaviour in
|
|
|
|
# udev <= 154. See also
|
|
|
|
# http://www.spinics.net/lists/hotplug/msg03935.html
|
|
|
|
substituteInPlace $out/60-persistent-storage.rules \
|
|
|
|
--replace ID_CDROM_MEDIA_TRACK_COUNT_DATA ID_CDROM_MEDIA
|
2008-08-08 22:44:45 +00:00
|
|
|
''; # */
|
|
|
|
};
|
|
|
|
|
2011-08-24 21:24:39 +00:00
|
|
|
|
2012-09-28 15:35:27 +00:00
|
|
|
# The binary keymap for busybox to load at boot.
|
2012-08-12 07:12:54 +00:00
|
|
|
busyboxKeymap = pkgs.runCommand "boottime-keymap"
|
|
|
|
{ preferLocalBuild = true; }
|
|
|
|
''
|
2012-09-24 21:15:26 +00:00
|
|
|
${pkgs.kbd}/bin/loadkeys -qb "${config.i18n.consoleKeyMap}" > $out ||
|
|
|
|
${pkgs.kbd}/bin/loadkeys -qbu "${config.i18n.consoleKeyMap}" > $out
|
2012-08-12 07:12:54 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
|
2008-08-08 17:34:30 +00:00
|
|
|
# The init script of boot stage 1 (loading kernel modules for
|
|
|
|
# mounting the root FS).
|
|
|
|
bootStage1 = pkgs.substituteAll {
|
2009-05-25 14:19:33 +00:00
|
|
|
src = ./stage-1-init.sh;
|
2007-02-06 16:53:36 +00:00
|
|
|
|
2012-05-21 19:26:07 +00:00
|
|
|
shell = "${extraUtils}/bin/ash";
|
2009-02-22 16:08:13 +00:00
|
|
|
|
2008-08-08 17:34:30 +00:00
|
|
|
isExecutable = true;
|
2007-02-06 16:53:36 +00:00
|
|
|
|
2012-09-28 15:35:27 +00:00
|
|
|
inherit udevRules extraUtils modulesClosure busyboxKeymap;
|
2009-12-15 16:38:20 +00:00
|
|
|
|
2011-09-13 18:49:47 +00:00
|
|
|
inherit (config.boot) resumeDevice devSize runSize;
|
2007-02-06 16:53:36 +00:00
|
|
|
|
2009-06-18 16:47:00 +00:00
|
|
|
inherit (config.boot.initrd) checkJournalingFS
|
2011-12-28 21:46:45 +00:00
|
|
|
preLVMCommands postDeviceCommands postMountCommands kernelModules;
|
2009-06-15 16:47:37 +00:00
|
|
|
|
2012-05-21 19:26:07 +00:00
|
|
|
fsInfo =
|
|
|
|
let f = fs: [ fs.mountPoint (if fs.device != null then fs.device else "/dev/disk/by-label/${fs.label}") fs.fsType fs.options ];
|
|
|
|
in pkgs.writeText "initrd-fsinfo" (concatStringsSep "\n" (concatMap f fileSystems));
|
2008-08-08 17:34:30 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
# The closure of the init script of boot stage 1 is what we put in
|
|
|
|
# the initial RAM disk.
|
|
|
|
initialRamdisk = pkgs.makeInitrd {
|
2010-06-01 16:38:42 +00:00
|
|
|
contents =
|
|
|
|
[ { object = bootStage1;
|
|
|
|
symlink = "/init";
|
|
|
|
}
|
2012-03-13 13:26:21 +00:00
|
|
|
{ object = pkgs.writeText "mdadm.conf" config.boot.initrd.mdadmConf;
|
|
|
|
symlink = "/etc/mdadm.conf";
|
|
|
|
}
|
2010-06-01 16:38:42 +00:00
|
|
|
] ++ optionals enableSplashScreen
|
|
|
|
[ { object = extraUtils;
|
2008-08-08 17:34:30 +00:00
|
|
|
suffix = "/bin/splash_helper";
|
|
|
|
symlink = "/${kernelPackages.splashutils.helperName}";
|
2010-06-01 16:38:42 +00:00
|
|
|
}
|
2009-05-29 14:46:27 +00:00
|
|
|
{ object = import ../../../lib/unpack-theme.nix {
|
2008-08-08 17:34:30 +00:00
|
|
|
inherit (pkgs) stdenv;
|
|
|
|
theme = config.services.ttyBackgrounds.defaultTheme;
|
|
|
|
};
|
|
|
|
symlink = "/etc/splash";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
2011-08-24 21:24:39 +00:00
|
|
|
|
2009-05-27 08:14:06 +00:00
|
|
|
in {
|
|
|
|
|
2009-05-27 09:46:50 +00:00
|
|
|
require = [options];
|
|
|
|
|
2009-05-27 08:14:06 +00:00
|
|
|
system.build.bootStage1 = bootStage1;
|
|
|
|
system.build.initialRamdisk = initialRamdisk;
|
2010-08-24 13:27:28 +00:00
|
|
|
system.build.extraUtils = extraUtils;
|
2009-05-27 08:14:06 +00:00
|
|
|
|
2012-08-07 10:57:01 +00:00
|
|
|
system.requiredKernelConfig = with config.lib.kernelConfig; [
|
|
|
|
(isYes "TMPFS")
|
2012-08-07 22:09:08 +00:00
|
|
|
(isYes "BLK_DEV_INITRD")
|
2012-08-07 10:57:01 +00:00
|
|
|
];
|
2006-11-02 22:48:01 +00:00
|
|
|
}
|