extract log persistence config from s6 to new module
because it frobs kernel config, it breaks levitate as levitate evalModules doesn't include the kernel
This commit is contained in:
19
modules/logging.nix
Normal file
19
modules/logging.nix
Normal file
@@ -0,0 +1,19 @@
|
||||
{ config, lib, ... }:
|
||||
let
|
||||
inherit (lib) mkIf mkEnableOption mkOption types;
|
||||
in {
|
||||
options = {
|
||||
logging = {
|
||||
persistent = {
|
||||
enable = mkEnableOption "store logs across reboots";
|
||||
};
|
||||
};
|
||||
};
|
||||
config = {
|
||||
kernel.config = mkIf config.logging.persistent.enable {
|
||||
PSTORE = "y";
|
||||
PSTORE_PMSG = "y";
|
||||
PSTORE_RAM = "y";
|
||||
};
|
||||
};
|
||||
}
|
Reference in New Issue
Block a user