Files
pvv-nixos-config/base/services/smartd.nix
h7x4 5f94345a91
Some checks failed
Eval nix flake / evals (push) Failing after 3m12s
Build topology graph / evals (push) Successful in 3m23s
hosts/various: enable qemu guest agent, disable smartd for vms by default
2026-01-22 16:05:36 +09:00

23 lines
616 B
Nix

{ config, pkgs, lib, ... }:
{
services.smartd = {
# NOTE: qemu guests tend not to have SMART-reporting disks. Please override for the
# hosts with disk passthrough.
enable = lib.mkDefault (!config.services.qemuGuest.enable);
notifications = {
mail = {
enable = true;
sender = "root@pvv.ntnu.no";
recipient = "root@pvv.ntnu.no";
};
wall.enable = false;
};
};
environment.systemPackages = lib.optionals config.services.smartd.enable (with pkgs; [
smartmontools
]);
systemd.services.smartd.unitConfig.ConditionVirtualization = "no";
}