nixos/installer: add option to change fileystem during sd-image creation

enables the usage of different filesystems besides EXT4 for the root partition on the sd-card (e.g. BTRFS, XFS, ...)
This commit is contained in:
Jan B.
2025-09-09 10:38:01 +02:00
committed by Jan Braun
parent 96a2a1f21c
commit 0d896304de

View File

@@ -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