mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 14:26:33 +01:00
32 lines
649 B
Nix
32 lines
649 B
Nix
{ config, lib, pkgs, ... }:
|
|
{
|
|
meta.maintainers = with lib.maintainers; [ grahamc ];
|
|
options = {
|
|
|
|
hardware.mcelog = {
|
|
enable = lib.mkOption {
|
|
type = lib.types.bool;
|
|
default = false;
|
|
description = ''
|
|
Enable the Machine Check Exception logger.
|
|
'';
|
|
};
|
|
};
|
|
|
|
};
|
|
|
|
config = lib.mkIf config.hardware.mcelog.enable {
|
|
systemd = {
|
|
packages = [ pkgs.mcelog ];
|
|
|
|
services.mcelog = {
|
|
wantedBy = [ "multi-user.target" ];
|
|
serviceConfig = {
|
|
ProtectHome = true;
|
|
PrivateNetwork = true;
|
|
PrivateTmp = true;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|