2017-02-26 15:50:01 +01:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
2017-07-27 07:03:36 +02:00
|
|
|
meta.maintainers = with maintainers; [ grahamc ];
|
2017-02-26 15:50:01 +01:00
|
|
|
options = {
|
|
|
|
|
|
|
|
hardware.mcelog = {
|
|
|
|
enable = mkOption {
|
|
|
|
type = types.bool;
|
|
|
|
default = false;
|
2022-07-28 23:19:15 +02:00
|
|
|
description = lib.mdDoc ''
|
2017-02-26 15:50:01 +01:00
|
|
|
Enable the Machine Check Exception logger.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf config.hardware.mcelog.enable {
|
2017-07-27 07:03:36 +02:00
|
|
|
systemd = {
|
|
|
|
packages = [ pkgs.mcelog ];
|
|
|
|
|
|
|
|
services.mcelog = {
|
|
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
serviceConfig = {
|
|
|
|
ProtectHome = true;
|
|
|
|
PrivateNetwork = true;
|
|
|
|
PrivateTmp = true;
|
|
|
|
};
|
2017-02-26 15:50:01 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|