summary refs log blame commit diff
path: root/nixos/modules/hardware/mcelog.nix
blob: 13ad238870c2991883acd256b5b7aac37ef501de (plain) (tree)
1
2
3
4
5
6




                           
                                                   














                                                    









                                           


        
 
{ config, lib, pkgs, ... }:

with lib;

{
  meta.maintainers = with maintainers; [ grahamc ];
  options = {

    hardware.mcelog = {
      enable = mkOption {
        type = types.bool;
        default = false;
        description = ''
          Enable the Machine Check Exception logger.
        '';
      };
    };

  };

  config = mkIf config.hardware.mcelog.enable {
    systemd = {
      packages = [ pkgs.mcelog ];

      services.mcelog = {
        wantedBy = [ "multi-user.target" ];
        serviceConfig = {
          ProtectHome = true;
          PrivateNetwork = true;
          PrivateTmp = true;
        };
      };
    };
  };
}