diff options
Diffstat (limited to 'nixpkgs/nixos/modules/hardware/mcelog.nix')
-rw-r--r-- | nixpkgs/nixos/modules/hardware/mcelog.nix | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/nixpkgs/nixos/modules/hardware/mcelog.nix b/nixpkgs/nixos/modules/hardware/mcelog.nix new file mode 100644 index 000000000000..13ad238870c2 --- /dev/null +++ b/nixpkgs/nixos/modules/hardware/mcelog.nix @@ -0,0 +1,35 @@ +{ 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; + }; + }; + }; + }; +} |