diff options
Diffstat (limited to 'modules/programs/brew-bundle.nix')
| -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 '' |
