liminix

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

logging.nix (370B)


      1 { config, lib, ... }:
      2 let
      3   inherit (lib)
      4     mkIf
      5     mkEnableOption
      6     ;
      7 in
      8 {
      9   options = {
     10     logging = {
     11       persistent = {
     12         enable = mkEnableOption "store logs across reboots";
     13       };
     14     };
     15   };
     16   config = {
     17     kernel.config = mkIf config.logging.persistent.enable {
     18       PSTORE = "y";
     19       PSTORE_PMSG = "y";
     20       PSTORE_RAM = "y";
     21     };
     22   };
     23 }