Skip to content

Commit

Permalink
Merge pull request #23214 from grahamc/mcelog-service
Browse files Browse the repository at this point in the history
mcelog: init Machine Check Exception Logging Daemon service
  • Loading branch information
grahamc committed Feb 26, 2017
2 parents 4b6f021 + 1430506 commit 4f3d06d
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
37 changes: 37 additions & 0 deletions nixos/modules/hardware/mcelog.nix
@@ -0,0 +1,37 @@
{ config, lib, pkgs, ... }:

with lib;

{
meta.maintainers = [ 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.services.mcelog = {
description = "Machine Check Exception Logging Daemon";
wantedBy = [ "multi-user.target" ];

serviceConfig = {
ExecStart = "${pkgs.mcelog}/bin/mcelog --daemon --foreground";
SuccessExitStatus = [ 0 15 ];

ProtectHome = true;
PrivateNetwork = true;
PrivateTmp = true;
};
};
};

}
1 change: 1 addition & 0 deletions nixos/modules/module-list.nix
Expand Up @@ -30,6 +30,7 @@
./hardware/cpu/amd-microcode.nix
./hardware/cpu/intel-microcode.nix
./hardware/ksm.nix
./hardware/mcelog.nix
./hardware/network/b43.nix
./hardware/network/intel-2100bg.nix
./hardware/network/intel-2200bg.nix
Expand Down

0 comments on commit 4f3d06d

Please sign in to comment.