anchor.diff:          example =
             { srv =
                { path = "/srv";
  -               "read only" = "yes";
  +               "read only" = true;
                   comment = "Public samba share.";
                };
             };
  
positive.code:       [ global ]
        security = ${cfg.securityType}
        passwd program = /var/setuid-wrappers/passwd %u
        pam password change = ${if cfg.syncPasswordsByPam then "yes" else "no"}
        invalid users = ${toString cfg.invalidUsers}
  
        ${cfg.extraConfig}
  
        ${toString (map shareConfig (attrNames cfg.shares))}
      '');
  
    # This may include nss_ldap, needed for samba if it has to use ldap.
  
negative.code: 
    shareConfig = name:
      let share = getAttr name cfg.shares; in
      "[${name}]\n " + (smbToString (
         map
           (key: "${key} = ${smbToString (getAttr key share)}\n")
           (attrNames share)
      ));
  
  