nixos/modules/image: fix error message

When a module is not found, it did not show the intended error message
`The module ... does not exist`, but rather `path ... does not exist`.
This commit is contained in:
Alexander Foremny 2025-03-17 13:36:50 +01:00
parent a9d6503abc
commit 5c28518c4b

View file

@ -47,7 +47,10 @@ let
let
module = ../. + "/installer/sd-card/sd-image-${pkgs.targetPlatform.qemuArch}.nix";
in
if builtins.pathExists module then [ module ] else throw "The module ${module} does not exist.";
if builtins.pathExists module then
[ module ]
else
throw "The module ${toString module} does not exist.";
};
kexec = ../installer/netboot/netboot-minimal.nix;
};