liminix

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

logging.nix (393B)


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