anchor.diff:  let
   
     cfg = config.services.smartd;
  +
  +  smartdOpts = { name, ... }: {
  +
  +    options = {
  +
  +      device = mkOption {
  +        example = "/dev/sda";
  +        type = types.string;
  +        description = "Location of the device.";
  +      };
  +
  +      options = mkOption {
  +        default = "";
  +        example = "-d sat";
  +        type = types.string;
  +        merge = pkgs.lib.concatStringsSep " ";
  +        description = "Options that determine how smartd monitors the device";
  +      };
  +    };
  +
  +  };
   
     smartdMail = pkgs.writeScript "smartdmail.sh" ''
       #! ${pkgs.stdenv.shell}
  
positive.code: 
    smartdConf = pkgs.writeText "smartd.conf" (concatMapStrings (device:
      ''
        ${device} -a -m root -M exec ${smartdMail} ${cfg.deviceOpts}
      ''
      ) cfg.devices);
  
  
negative.code: 
        devices = mkOption {
          default = [];
          example = [ { device = "/dev/sda"; } { device = "/dev/sdb"; options = "-d sat"; } ];
          type = types.list types.optionSet;
          options = [ smartdOpts ];
          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
  