diff --git a/nixos/modules/services/monitoring/smartd.nix b/nixos/modules/services/monitoring/smartd.nix index a3612be3cc23..2cc9f043cf05 100644 --- a/nixos/modules/services/monitoring/smartd.nix +++ b/nixos/modules/services/monitoring/smartd.nix @@ -239,11 +239,7 @@ in systemd.services.smartd = { description = "S.M.A.R.T. Daemon"; - wantedBy = [ "multi-user.target" ]; - - path = [ pkgs.nettools ]; # for hostname and dnsdomanname calls in smartd - serviceConfig.ExecStart = "${pkgs.smartmontools}/sbin/smartd ${lib.concatStringsSep " " cfg.extraOptions} --no-fork --configfile=${smartdConf}"; }; diff --git a/pkgs/tools/system/smartmontools/default.nix b/pkgs/tools/system/smartmontools/default.nix index f4941df8ebd3..5d9196fcc163 100644 --- a/pkgs/tools/system/smartmontools/default.nix +++ b/pkgs/tools/system/smartmontools/default.nix @@ -1,4 +1,5 @@ { stdenv, fetchurl, autoreconfHook +, mailutils, inetutils , IOKit ? null , ApplicationServices ? null }: let @@ -24,6 +25,10 @@ in stdenv.mkDerivation rec { patches = [ ./smartmontools.patch ]; postPatch = "cp -v ${driverdb} drivedb.h"; + configureFlags = [ + "--with-scriptpath=${stdenv.lib.makeBinPath [ mailutils inetutils ]}" + ]; + nativeBuildInputs = [ autoreconfHook ]; buildInputs = [] ++ stdenv.lib.optionals stdenv.isDarwin [IOKit ApplicationServices]; enableParallelBuilding = true;