anchor.diff:      concatStringsSep "\n" (mapAttrsToList (name: id: ''mas "${name}", id: ${toString id}'') entries) +
       "\n"
     );
  -
   
     brewfile = pkgs.writeText "Brewfile" (
       mkBrewfileSectionString "Taps" "tap" cfg.taps +
  
positive.code:     };
  
      casks = mkOption {
        type = with types; listOf str;
        default = [];
        example = [ "hammerspoon" "virtualbox" ];
        description = "Homebrew casks to install.";
      };
  
      masApps = mkOption {
  
negative.code:             else ", restart_service: :${config.restart_service}"
            );
        };
    };
  
    caskOptions = { config, ...  }: {
      options = {
        name = mkOption {
          type = types.str;
          description = "The name of the cask to install.";
        };
        args = mkOption {
          type = types.nullOr (types.submodule caskArgsOptions);
          default = null;
        };
        greedy = mkNullOrBoolOption {
          description = ''
            Whether to always upgrade auto-updated or unversioned cask to latest version even if
            already installed.
          '';
        };
  
        brewfileLine = mkBrewfileLineOption;
      };
  
      config = {
        brewfileLine = ''cask "${config.name}"''
        + optionalString (config.args != null)
          '', args: { ${removePrefix "cask_args " config.args.brewfileLine} }''
        + optionalString (config.greedy != null) ", greedy: ${boolToString config.greedy}";
      };
    };
  in
  
  