diff --git a/nixos/modules/installer/sd-card/sd-image.nix b/nixos/modules/installer/sd-card/sd-image.nix index 7a2e271c4dde..c43f1642cdec 100644 --- a/nixos/modules/installer/sd-card/sd-image.nix +++ b/nixos/modules/installer/sd-card/sd-image.nix @@ -21,7 +21,7 @@ with lib; let - rootfsImage = pkgs.callPackage ../../../lib/make-ext4-fs.nix ( + rootfsImage = pkgs.callPackage config.sdImage.rootFilesystemCreator ( { inherit (config.sdImage) storePaths; compressImage = config.sdImage.compressImage; @@ -128,6 +128,20 @@ in ''; }; + rootFilesystemCreator = mkOption { + type = types.oneOf [ + types.package + types.path + ]; + default = ../../../lib/make-ext4-fs.nix; + example = '' + nixpkgs/nixos/lib/make-btrfs-fs.nix + ''; + description = '' + The filesystem creator used for the root partition. + ''; + }; + firmwareSize = mkOption { type = types.int; # As of 2019-08-18 the Raspberry pi firmware + u-boot takes ~18MiB