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