anchor.diff:  
           daemonType = "daemon";
   
  -        exec = "${pkgs.smartmontools}/sbin/smartd";
  +        exec = "${pkgs.smartmontools}/sbin/smartd --pidfile=/var/run/smartd.pid ${smartdFlags}";
         };
   
     };
  
positive.code: let
  
    cfg = config.services.smartd;
  
  in
  
  
negative.code:         type = types.bool;
          example = "true";
          description = ''
            Run smartd from the smartmontools package. Note that e-mail
            notifications will not be enabled unless you configure the list of
            devices with <varname>services.smartd.devices</varname> as well.
          '';
        };
  
        devices = mkOption {
          default = [];
          example = ["/dev/sda" "/dev/sdb"];
          description = ''
            List of devices to monitor. By default -- if this list is empty --,
            smartd will monitor all devices connected to the machine at the time
            it's being run. Configuring this option has the added benefit of
            enabling e-mail notifications to "root" every time smartd detects an
            error.
          '';
         };
      };
  
    };
  