From 338ef594c7d7ab14468ead71b2526c17ee5b6e5b Mon Sep 17 00:00:00 2001 From: Shea Levy Date: Tue, 19 Feb 2013 11:55:39 -0500 Subject: [PATCH] Add boot.initrd.compressor option --- modules/system/boot/stage-1.nix | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/modules/system/boot/stage-1.nix b/modules/system/boot/stage-1.nix index a66e609ba7b..f78a5dda2d3 100644 --- a/modules/system/boot/stage-1.nix +++ b/modules/system/boot/stage-1.nix @@ -95,6 +95,16 @@ let ''; }; + boot.initrd.compressor = mkOption { + default = "gzip -9"; + + type = types.string; + + description = "The compressor to use on the initrd"; + + example = "xz"; + }; + fileSystems = mkOption { options.neededForBoot = mkOption { default = false; @@ -317,6 +327,8 @@ let # The closure of the init script of boot stage 1 is what we put in # the initial RAM disk. initialRamdisk = pkgs.makeInitrd { + inherit (config.boot.initrd) compressor; + contents = [ { object = bootStage1; symlink = "/init";