anchor.diff:          '';
         };
   
  -      brewfileLine = mkBrewfileLineOption;
  +      brewfileLine = mkInternalOption { type = types.nullOr types.str; };
       };
   
       config =
  
positive.code:         sCfg = mkProcessedSubmodConfig config;
        in
        {
          brewfileLine = if sCfg == { } then null else "cask_args ${mkBrewfileLineOptionsListString sCfg}";
        };
    };
  
  
negative.code:     };
    };
  
    globalOptions = { config, ... }: {
      options = {
        brewfile = mkOption {
          type = types.bool;
          default = false;
          description = ''
            Whether to enable Homebrew to automatically use the Brewfile that this module generates in
            the Nix store, when you manually invoke <command>brew bundle</command>.
  
            Enabling this option will change the default value of
            ${mkDocOptionLink "homebrew.global.lockfiles"} to <literal>false</literal> since, with
            this option enabled, <command>brew bundle [install]</command> will default to using the
            Brewfile that this module generates in the Nix store, unless you explicitly point it at
            another Brewfile using the <literal>--file</literal> flag. As a result, it will try to
            write the lockfile in the Nix store, and complain that it can't (though the command will
            run successfully regardless).
  
            Implementation note: when enabled, this option sets the
            <literal>HOMEBREW_BUNDLE_FILE</literal> environment variable to the path of the Brewfile
            that this module generates in the Nix store, by adding it to
            ${mkDocOptionLink "environment.variables"}.
          '';
        };
        autoUpdate = mkOption {
          type = types.bool;
          default = true;
          description = ''
            Whether to enable Homebrew to auto-update itself and all formulae when you manually invoke
            commands like <command>brew install</command>, <command>brew upgrade</command>,
            <command>brew tap</command>, and <command>brew bundle [install]</command>.
  
            Note that Homebrew auto-updates when you manually invoke commands like the ones mentioned
            above if it's been more then 5 minutes since it last updated.
  
            You may want to consider disabling this option if you have
            ${mkDocOptionLink "homebrew.onActivation.upgrade"} enabled, and
            ${mkDocOptionLink "homebrew.onActivation.autoUpdate"} disabled, if you want to ensure that
            your installed formulae will only be upgraded during <command>nix-darwin</command> system
            activation, after you've explicitly run <command>brew update</command>.
  
            Implementation note: when disabled, this option sets the
            <literal>HOMEBREW_NO_AUTO_UPDATE</literal> environment variable, by adding it to
            ${mkDocOptionLink "environment.variables"}.
          '';
        };
        lockfiles = mkOption {
          type = types.bool;
          default = !config.brewfile;
          defaultText = literalExpression "!config.homebrew.global.brewfile";
          description = ''
            Whether to enable Homebrew to generate lockfiles when you manually invoke
            <command>brew bundle [install]</command>.
  
            This option will default to <literal>false</literal> if
            ${mkDocOptionLink "homebrew.global.brewfile"} is enabled since, with that option enabled,
            <command>brew bundle [install]</command> will default to using the Brewfile that this
            module generates in the Nix store, unless you explicitly point it at another Brewfile
            using the <literal>--file</literal> flag. As a result, it will try to write the
            lockfile in the Nix store, and complain that it can't (though the command will run
            successfully regardless).
  
            Implementation note: when disabled, this option sets the
            <literal>HOMEBREW_BUNDLE_NO_LOCK</literal> environment variable, by adding it to
            ${mkDocOptionLink "environment.variables"}.
          '';
        };
  
        # The `noLock` option was replaced by `lockfiles`. Due to `homebrew.global` being a submodule,
        # we can't use `mkRemovedOptionModule`, so we leave this option definition here, and trigger
        # and error message with an assertion below if it's set by the user.
        noLock = mkOption { visible = false; default = null; };
  
        homebrewEnvironmentVariables = mkInternalOption { type = types.attrs; };
      };
  
      config = {
        homebrewEnvironmentVariables = {
          HOMEBREW_BUNDLE_FILE = mkIf config.brewfile "${brewfileFile}";
          HOMEBREW_NO_AUTO_UPDATE = mkIf (!config.autoUpdate) "1";
          HOMEBREW_BUNDLE_NO_LOCK = mkIf (!config.lockfiles) "1";
        };
      };
    };
  
    tapOptions = { config, ... }: {
      options = {
        name = mkOption {
  