From df06dc470f1b4f04ecbb4c69872c1bdc10ab283d Mon Sep 17 00:00:00 2001 From: Malo Bourgon Date: Mon, 14 Dec 2020 19:09:58 -0800 Subject: [PATCH] Update names of options that set user env vars in brew-bundle module --- modules/programs/brew-bundle.nix | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/modules/programs/brew-bundle.nix b/modules/programs/brew-bundle.nix index 0d4380d..295a076 100644 --- a/modules/programs/brew-bundle.nix +++ b/modules/programs/brew-bundle.nix @@ -86,26 +86,28 @@ in ''; }; - setNoLockEnvvar = mkOption { + userConfig.brewfile = mkOption { type = types.bool; default = true; description = '' - Sets the HOMEBREW_BUNDLE_NO_LOCK enviroment variable, by adding it to - , so that lock files aren't generated when/if you run - the brew bundle command yourself. - ''; - }; + When enabled, when you manually invoke brew bundle, it will automatically + use the Brewfile in the Nix store that this module generates. - setBrewfileEnvvar = mkOption { - type = types.bool; - default = true; - description = '' Sets the HOMEBREW_BUNDLE_FILE enviroment variable to the path of the Brewfile in the Nix store that this module generates, by adding it to . + ''; + }; - With this option enabled, brew bundle commands will automatically use - the Brewfile in the Nix store that this module generates. + userConfig.noLock = mkOption { + type = types.bool; + default = true; + description = '' + When enabled, lock files aren't generated when you manually invoke + brew bundle. + + Sets the HOMEBREW_BUNDLE_NO_LOCK enviroment variable, by adding it to + . ''; }; @@ -211,8 +213,8 @@ in optional (cfg.whalebrews != []) "whalebrew"; environment.variables = mkIf cfg.enable ( - (if cfg.setNoLockEnvvar then { HOMEBREW_BUNDLE_NO_LOCK = "1"; } else {}) // - (if cfg.setBrewfileEnvvar then { HOMEBREW_BUNDLE_FILE = "${brewfile}"; } else {}) + (if cfg.userConfig.brewfile then { HOMEBREW_BUNDLE_FILE = "${brewfile}"; } else {}) // + (if cfg.userConfig.noLock then { HOMEBREW_BUNDLE_NO_LOCK = "1"; } else {}) ); system.activationScripts.brew-bundle.text = mkIf cfg.enable ''