mirror of
https://github.com/SebastianWendel/srx-platform-nix.git
synced 2024-09-19 20:09:02 +02:00
43 lines
925 B
Nix
43 lines
925 B
Nix
{ inputs, config, pkgs, lib, ... }:
|
|
{
|
|
imports = with inputs; [
|
|
nixos-hardware.nixosModules.common-pc-ssd
|
|
];
|
|
|
|
environment = {
|
|
etc."mdadm.conf".text = ''
|
|
MAILADDR root
|
|
'';
|
|
|
|
systemPackages = with pkgs; [
|
|
hdparm
|
|
sdparm
|
|
nvme-cli
|
|
smartmontools
|
|
];
|
|
};
|
|
|
|
hardware.sensor.hddtemp = {
|
|
enable = lib.mkDefault true;
|
|
drives = [ "/dev/disk/by-path/*" ];
|
|
};
|
|
|
|
services = {
|
|
smartd = {
|
|
enable = lib.mkDefault true;
|
|
notifications = {
|
|
mail.enable = lib.mkIf config.services.postfix.enable true;
|
|
x11.enable = lib.mkIf config.services.xserver.enable true;
|
|
};
|
|
};
|
|
|
|
telegraf.extraConfig.inputs = lib.mkIf config.services.telegraf.enable {
|
|
hddtemp = { };
|
|
smart = {
|
|
path_smartctl = lib.mkForce "${pkgs.smartmontools}/bin/smartctl";
|
|
path_nvme = lib.mkForce "${pkgs.nvme-cli}/bin/nvme";
|
|
};
|
|
};
|
|
};
|
|
}
|