1{
2 config,
3 lib,
4 pkgs,
5 ...
6}:
7{
8 meta.maintainers = with lib.maintainers; [ grahamc ];
9 options = {
10
11 hardware.mcelog = {
12 enable = lib.mkOption {
13 type = lib.types.bool;
14 default = false;
15 description = ''
16 Enable the Machine Check Exception logger.
17 '';
18 };
19 };
20
21 };
22
23 config = lib.mkIf config.hardware.mcelog.enable {
24 systemd = {
25 packages = [ pkgs.mcelog ];
26
27 services.mcelog = {
28 wantedBy = [ "multi-user.target" ];
29 serviceConfig = {
30 ProtectHome = true;
31 PrivateNetwork = true;
32 PrivateTmp = true;
33 };
34 };
35 };
36 };
37}