liminix

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

ramdisk.nix (594B)


      1 { config, lib, ... }:
      2 let
      3   inherit (lib) mkIf mkEnableOption; # types concatStringsSep;
      4 in
      5 {
      6   options = {
      7     boot = {
      8       ramdisk = {
      9         enable = mkEnableOption ''
     10           reserving part of memory as
     11           an MTD-based RAM disk.  Needed for TFTP booting
     12         '';
     13       };
     14     };
     15   };
     16   config = mkIf config.boot.ramdisk.enable {
     17     kernel = {
     18       config = {
     19         MTD = "y";
     20         MTD_PHRAM = "y";
     21         MTD_CMDLINE_PARTS = "y";
     22         MTD_OF_PARTS = "y";
     23         PARTITION_ADVANCED = "y";
     24         MTD_BLKDEVS = "y";
     25         MTD_BLOCK = "y";
     26       };
     27     };
     28   };
     29 }