2
0
Files
liminix/modules/ramdisk.nix
T

30 lines
594 B
Nix
Raw Normal View History

2024-06-30 16:58:29 +01:00
{ config, lib, ... }:
let
2024-06-29 22:59:27 +01:00
inherit (lib) mkIf mkEnableOption; # types concatStringsSep;
2025-02-10 21:55:08 +00:00
in
{
options = {
boot = {
ramdisk = {
enable = mkEnableOption ''
reserving part of memory as
2025-01-05 17:22:30 +00:00
an MTD-based RAM disk. Needed for TFTP booting
'';
};
};
};
config = mkIf config.boot.ramdisk.enable {
kernel = {
config = {
MTD = "y";
MTD_PHRAM = "y";
MTD_CMDLINE_PARTS = "y";
MTD_OF_PARTS = "y";
PARTITION_ADVANCED = "y";
MTD_BLKDEVS = "y";
MTD_BLOCK = "y";
};
};
};
}