2017-02-26 14:50:01 +00:00
|
|
|
{ config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
|
|
|
|
|
|
|
{
|
2017-07-27 06:03:36 +01: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 = ''
|
|
|
|
Enable the Machine Check Exception logger.
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
config = mkIf config.hardware.mcelog.enable {
|
2017-07-27 06:03:36 +01: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
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|