anchor.diff:      else abort "The value: ${generators.toPretty v} is not a valid Brewfile value.";
   
     mkBrewfileLineOptionsListString = attrs:
  -    concatStringsSep ", " (mapAttrsToList (n: v: "${n}: ${mkBrewfileLineValueString v}") attrs);
  +    concatStringsSep ", " (mapAttrsToList (n: v: "${n}: ${v}") attrs);
  +
  +
  +  # Submodule helper functions ---------------------------------------------------------------------
   
     mkNullOrBoolOption = args: mkOption (args // {
       type = types.nullOr types.bool;
  
positive.code:       brewfileLine = mkBrewfileLineOption;
      };
  
      config = {
        brewfileLine = ''tap "${config.name}"''
          + optionalString (config.clone_target != null) '', "${config.clone_target}"''
          + optionalString (config.force_auto_update != null)
            ", force_auto_update: ${boolToString config.force_auto_update}";
      };
    };
  
    # Sourced from https://docs.brew.sh/Manpage#global-cask-options
  
negative.code:       '';
        description = "Extra lines to be added verbatim to bottom of the generated Brewfile.";
      };
  
      brewfile = mkOption {
        type = types.str;
        visible = false;
        internal = true;
        readOnly = true;
        description = "String reprensentation of the generated Brewfile useful for debugging.";
      };
    };
  
  
    # Implementation ---------------------------------------------------------------------------------
  
    config = {
      homebrew.brews =
        optional (cfg.masApps != { }) "mas"
        ++ optional (cfg.whalebrews != [ ]) "whalebrew";
  
      homebrew.brewfile =
        "# Created by `nix-darwin`'s `homebrew` module\n\n"
        + mkBrewfileSectionString "Taps" cfg.taps
        + mkBrewfileSectionString "Arguments for all casks"
          (optional (cfg.caskArgs.brewfileLine != null) cfg.caskArgs)
        + mkBrewfileSectionString "Brews" cfg.brews
        + mkBrewfileSectionString "Casks" cfg.casks
        + mkBrewfileSectionString "Mac App Store apps"
          (mapAttrsToList (n: id: ''mas "${n}", id: ${toString id}'') cfg.masApps)
        + mkBrewfileSectionString "Docker containers" (map (v: ''whalebrew "${v}"'') cfg.whalebrews)
        + optionalString (cfg.extraConfig != "") ("# Extra config\n" + cfg.extraConfig);
  
      environment.variables = mkIf cfg.enable (
        optionalAttrs cfg.global.brewfile { HOMEBREW_BUNDLE_FILE = "${brewfileFile}"; }
        // optionalAttrs cfg.global.noLock { HOMEBREW_BUNDLE_NO_LOCK = "1"; }
      );
  
      system.activationScripts.homebrew.text = mkIf cfg.enable ''
        # Homebrew Bundle
  