2025-01-02 23:56:49 +00:00
|
|
|
{ config, lib, ... }:
|
|
|
|
let
|
2025-02-10 21:55:08 +00:00
|
|
|
inherit (lib)
|
|
|
|
mkIf
|
|
|
|
mkEnableOption
|
|
|
|
mkOption
|
|
|
|
types
|
|
|
|
;
|
|
|
|
in
|
|
|
|
{
|
2025-01-02 23:56:49 +00:00
|
|
|
options = {
|
|
|
|
logging = {
|
|
|
|
persistent = {
|
|
|
|
enable = mkEnableOption "store logs across reboots";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
2025-02-10 21:55:08 +00:00
|
|
|
config = {
|
|
|
|
kernel.config = mkIf config.logging.persistent.enable {
|
|
|
|
PSTORE = "y";
|
|
|
|
PSTORE_PMSG = "y";
|
|
|
|
PSTORE_RAM = "y";
|
|
|
|
};
|
|
|
|
};
|
2025-01-02 23:56:49 +00:00
|
|
|
}
|