From a2146feaf624584472fd9b0ea5b57f6f846c2334 Mon Sep 17 00:00:00 2001 From: Malo Bourgon Date: Mon, 14 Dec 2020 19:28:31 -0800 Subject: [PATCH] Change noAutoUpdate option to autoUpdate in brew-bundle module --- modules/programs/brew-bundle.nix | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/modules/programs/brew-bundle.nix b/modules/programs/brew-bundle.nix index 295a076..d5ba88e 100644 --- a/modules/programs/brew-bundle.nix +++ b/modules/programs/brew-bundle.nix @@ -29,9 +29,8 @@ let ); brew-bundle-command = - "HOMEBREW_NO_AUTO_UPDATE=" + - (if cfg.noAutoUpdate then "1" else "0") + - " brew bundle --file='${brewfile}' --no-lock" + + (if cfg.autoUpdate then "" else "HOMEBREW_NO_AUTO_UPDATE=1 ") + + "brew bundle --file='${brewfile}' --no-lock" + (if cfg.cleanup == "uninstall" || cfg.cleanup == "zap" then " --cleanup" else "") + (if cfg.cleanup == "zap" then " --zap" else ""); @@ -47,14 +46,13 @@ in installation instructions: https://brew.sh ''; - noAutoUpdate = mkOption { + autoUpdate = mkOption { type = types.bool; - default = true; - example = false; + default = false; description = '' - Sets the HOMEBREW_NO_AUTO_UPDATE environment variable when running the - brew bundle command. The default is true so that - repeated invocations of darwin-rebuild switch are idempotent. + When enabled, Homebrew is allowed to auto-update during nix-darwin + activation. The default is false so that repeated invocations of + darwin-rebuild switch are idempotent. ''; };