git.iko.soy/typeable/nixpkgs
on master help sign in
smartmontools: fix missing hostname in notifications

This properly registers some missing dependencies of smartd_warning.sh.

commitf1922cdbdc608b1f1f85a1d80310b54e89d0e9f3 authorpacien <pacien.trangirard@pacien.net> dateSun 16 Aug 2020, 20:48 (6 years ago) parentfeab14d
2 files changed+5−4
nixos/modules/services/monitoring/smartd.nix−4 pkgs/tools/system/smartmontools/default.nix+5
nixos/modules/services/monitoring/smartd.nix−4
@@ -239,11 +239,7 @@ in
239239
240240 systemd.services.smartd = {
241241 description = "S.M.A.R.T. Daemon";
242−
243242 wantedBy = [ "multi-user.target" ];
244−
245− path = [ pkgs.nettools ]; # for hostname and dnsdomanname calls in smartd
246−
247243 serviceConfig.ExecStart = "${pkgs.smartmontools}/sbin/smartd ${lib.concatStringsSep " " cfg.extraOptions} --no-fork --configfile=${smartdConf}";
248244 };
249245
pkgs/tools/system/smartmontools/default.nix+5
@@ -1,4 +1,5 @@
11{ stdenv, fetchurl, autoreconfHook
2+, mailutils, inetutils
23, IOKit ? null , ApplicationServices ? null }:
34
45let
@@ -24,6 +25,10 @@ in stdenv.mkDerivation rec {
2425 patches = [ ./smartmontools.patch ];
2526 postPatch = "cp -v ${driverdb} drivedb.h";
2627
28+ configureFlags = [
29+ "--with-scriptpath=${stdenv.lib.makeBinPath [ mailutils inetutils ]}"
30+ ];
31+
2732 nativeBuildInputs = [ autoreconfHook ];
2833 buildInputs = [] ++ stdenv.lib.optionals stdenv.isDarwin [IOKit ApplicationServices];
2934 enableParallelBuilding = true;