diff options
| author | Malo Bourgon <mbourgon@gmail.com> | 2020-12-14 19:09:58 -0800 |
|---|---|---|
| committer | Malo Bourgon <mbourgon@gmail.com> | 2020-12-14 19:14:35 -0800 |
| commit | df06dc470f1b4f04ecbb4c69872c1bdc10ab283d (patch) | |
| tree | ae674de673782db52eb155fcaed2804f72a7ac54 /modules | |
| parent | a38892c6c86dff99b7354d7bbb52e4edf71c4720 (diff) | |
Update names of options that set user env vars in brew-bundle module
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/programs/brew-bundle.nix | 26 |
1 files changed, 14 insertions, 12 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 <literal>HOMEBREW_BUNDLE_NO_LOCK</literal> enviroment variable, by adding it to - <option>environment.variables</option>, so that lock files aren't generated when/if you run - the <command>brew bundle</command> command yourself. + When enabled, when you manually invoke <command>brew bundle</command>, it will automatically + use the Brewfile in the Nix store that this module generates. + + Sets the <literal>HOMEBREW_BUNDLE_FILE</literal> enviroment variable to the path of the + Brewfile in the Nix store that this module generates, by adding it to + <option>environment.variables</option>. ''; }; - setBrewfileEnvvar = mkOption { + userConfig.noLock = mkOption { type = types.bool; default = true; description = '' - Sets the <literal>HOMEBREW_BUNDLE_FILE</literal> enviroment variable to the path of the - Brewfile in the Nix store that this module generates, by adding it to - <option>environment.variables</option>. + When enabled, lock files aren't generated when you manually invoke + <command>brew bundle</command>. - With this option enabled, <command>brew bundle</command> commands will automatically use - the Brewfile in the Nix store that this module generates. + Sets the <literal>HOMEBREW_BUNDLE_NO_LOCK</literal> enviroment variable, by adding it to + <option>environment.variables</option>. ''; }; @@ -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 '' |
