make jffs2 module provide o.rootfs, conditionally

it's enabled if config.rootfsType == "jffs2"
This commit is contained in:
Daniel Barlow
2023-04-10 19:59:09 +01:00
parent 63a89f7d0d
commit 42725f56f9
5 changed files with 33 additions and 6 deletions

17
modules/squashfs.nix Normal file
View File

@@ -0,0 +1,17 @@
{
config
, pkgs
, lib
, ...
}:
let
inherit (pkgs) liminix;
inherit (lib) mkIf;
in
{
config = mkIf (config.rootfsType == "squashfs") {
outputs = rec {
rootfs = liminix.builders.squashfs config.filesystem.contents;
};
};
}