added sudo rule to allow zabbix to execute smartctl

This commit is contained in:
mc-fucker 2025-06-06 10:23:41 +02:00
parent ddf6abe85f
commit 4dc55a82c9

View file

@ -22,6 +22,19 @@ in
pkgs.smartmontools
];
users.users.zabbix-agent.extraGroups = [ "systemd-journal" ];
#allow zabbix-agent to run smartctl
security.sudo.extraRules = [
{
users = [ "zabbix-agent" ];
commands = [
{
command = "${pkgs.smartmontools}/bin/smartctl";
options = [ "NOPASSWD" ];
}
];
}
];
}
# vim: set et ts=2 sw=2 ai: