From 690416cf1adfd4bea81b2bddbffe878e2eb0d624 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 27 May 2009 09:46:50 +0000 Subject: [PATCH] * Move initrd-related options to the appropriate module. svn path=/nixos/branches/modular-nixos/; revision=15746 --- modules/system/boot/stage-1.nix | 43 +++++++++++++++++++++++++++++++++ system/options.nix | 37 ---------------------------- 2 files changed, 43 insertions(+), 37 deletions(-) diff --git a/modules/system/boot/stage-1.nix b/modules/system/boot/stage-1.nix index f4dfdb931ec2..ff8a37662f94 100644 --- a/modules/system/boot/stage-1.nix +++ b/modules/system/boot/stage-1.nix @@ -6,6 +6,47 @@ {pkgs, config, ...}: let + + inherit (pkgs.lib) mkOption; + + options = { + + boot.resumeDevice = mkOption { + default = ""; + example = "0:0"; + description = " + Device for manual resume attempt during boot. Looks like + major:minor. ls -l /dev/SWAP_PARTION shows them. + "; + }; + + boot.initrd.allowMissing = mkOption { + default = false; + description = '' + Allow some initrd components to be missing. Useful for + custom kernel that are changed too often to track needed + kernelModules. + ''; + }; + + boot.initrd.lvm = mkOption { + default = true; + description = " + Whether to include lvm in the initial ramdisk. You should use this option + if your ROOT device is on lvm volume. + "; + }; + + boot.initrd.enableSplashScreen = mkOption { + default = true; + description = " + Whether to show a nice splash screen while booting. + "; + }; + + }; + + kernelPackages = config.boot.kernelPackages; modulesTree = config.system.modulesTree; @@ -199,6 +240,8 @@ let in { + require = [options]; + system.build.bootStage1 = bootStage1; system.build.initialRamdisk = initialRamdisk; diff --git a/system/options.nix b/system/options.nix index b5120f651d73..8a686cd9ee11 100644 --- a/system/options.nix +++ b/system/options.nix @@ -29,15 +29,6 @@ in "; }; - resumeDevice = mkOption { - default = ""; - example = "0:0"; - description = " - Device for manual resume attempt during boot. Looks like - major:minor. ls -l /dev/SWAP_PARTION shows them. - "; - }; - hardwareScan = mkOption { default = true; description = " @@ -50,34 +41,6 @@ in "; }; - initrd = { - - allowMissing = mkOption { - default = false; - description = '' - Allow some initrd components to be missing. Useful for - custom kernel that are changed too often to track needed - kernelModules. - ''; - }; - - lvm = mkOption { - default = true; - description = " - Whether to include lvm in the initial ramdisk. You should use this option - if your ROOT device is on lvm volume. - "; - }; - - enableSplashScreen = mkOption { - default = true; - description = " - Whether to show a nice splash screen while booting. - "; - }; - - }; - copyKernels = mkOption { default = false; description = "