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