diff --git a/nixos/modules/image/repart.nix b/nixos/modules/image/repart.nix index 4362982f5bac..4a0021e9a56e 100644 --- a/nixos/modules/image/repart.nix +++ b/nixos/modules/image/repart.nix @@ -88,6 +88,13 @@ in ''; }; + package = lib.mkPackageOption pkgs "systemd-repart" { + default = "systemd"; + example = lib.literalExpression '' + pkgs.systemdMinimal.override { withCryptsetup = true; } + ''; + }; + partitions = lib.mkOption { type = with lib.types; attrsOf (submodule partitionOptions); default = { }; @@ -178,9 +185,9 @@ in in pkgs.runCommand cfg.name { - nativeBuildInputs = with pkgs; [ - fakeroot - systemd + nativeBuildInputs = [ + cfg.package + pkgs.fakeroot ] ++ fileSystemTools; } '' amendedRepartDefinitions=$(${amendRepartDefinitions} ${partitions} ${definitionsDirectory})