2023-04-05 00:35:49 +02:00
|
|
|
{
|
|
|
|
config
|
|
|
|
, pkgs
|
2023-04-10 20:59:09 +02:00
|
|
|
, lib
|
2023-04-05 00:35:49 +02:00
|
|
|
, ...
|
|
|
|
}:
|
|
|
|
let
|
2024-08-26 18:55:58 +02:00
|
|
|
inherit (pkgs) liminix;
|
|
|
|
inherit (lib) mkIf;
|
2023-12-05 18:29:01 +01:00
|
|
|
o = config.system.outputs;
|
2023-04-05 00:35:49 +02:00
|
|
|
in
|
|
|
|
{
|
|
|
|
imports = [
|
|
|
|
./initramfs.nix
|
|
|
|
];
|
2023-07-13 20:24:59 +02:00
|
|
|
|
2023-04-10 20:59:09 +02:00
|
|
|
config = mkIf (config.rootfsType == "jffs2") {
|
2023-04-15 18:23:58 +02:00
|
|
|
kernel.config = {
|
|
|
|
JFFS2_FS = "y";
|
|
|
|
JFFS2_LZO = "y";
|
|
|
|
JFFS2_RTIME = "y";
|
|
|
|
JFFS2_COMPRESSION_OPTIONS = "y";
|
|
|
|
JFFS2_ZLIB = "y";
|
|
|
|
JFFS2_CMODE_SIZE = "y";
|
|
|
|
};
|
2023-04-10 20:07:27 +02:00
|
|
|
boot.initramfs.enable = true;
|
2023-12-05 18:29:01 +01:00
|
|
|
system.outputs = {
|
2024-08-26 18:55:58 +02:00
|
|
|
rootfs = liminix.builders.jffs2 {
|
|
|
|
bootableRootDirectory = o.bootablerootdir;
|
|
|
|
inherit (config.hardware.flash) eraseBlockSize;
|
|
|
|
};
|
2023-04-05 00:35:49 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|