[inputs.smart]: Error in plugin: failed to run command sudo -n /nix/store/zyxd72dfgwpmy4896xlfk44b75snign2-smartmontools-7.0/bin/smartctl --scan: exit status 1 - sudo: /nix/store/w6hlz3cd54w7sppp20ay0pc8c7pcd90b-sudo-1.8.27/bin/sudo sudo: effective uid is not 0, is sudo installed setuid root?
It looks like it’s using the sudo package binary directly but the /nix/store doesn’t support setuid flags. For that we have the setuid wrappers like /run/wrappers/bin/sudo that is being installed by security.sudo.enable = true;.
Make sure that security.sudo.enable = true; is set and that the sudo package is not part of the environment.systemPackages list. If that doesn’t work it means that something in the telegraf module is loading sudo directly.
[inputs.smart]: Error in plugin: failed to run comm and sudo -n /nix/store/zyxd72dfgwpmy4896xlfk44b75snign2-smartmontools-7.0/bin --scan: exec: "sudo": exeAll cutable file not found in $PATH -
error: getting attributes of path '/run/wrappers/binbin': No such file or directory
error: getting attributes of path '/run/wrappersbin': No such file or directory