Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

homebrew: allow setting greedy for all casks by default #1382

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion modules/homebrew.nix
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,9 @@ let
[](#opt-homebrew.caskArgs) for the available options.
'';
};
greedy = mkNullOrBoolOption {
greedy = mkOption {
type = types.nullOr types.bool;
Comment on lines +505 to +506
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There’s also --greedy-latest and --greedy-auto-updates, maybe this should be an enum?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK the options in this module are is just for Brewfile generation options, rather than being command-line parameters.

The only parameter I know that is possible to pass in regards to greediness of a cask is the boolean greedy: true option, so I would think it's better to not use an enum here and just stick to the boolean. I could be wrong about this tho.

default = cfg.greedyCasks;
description = ''
Whether to always upgrade this cask regardless of whether it's unversioned or it updates
itself.
Expand Down Expand Up @@ -631,6 +633,13 @@ in
'';
};

greedyCasks = mkNullOrBoolOption {
description = ''
Whether to always upgrade casks listed in [](#opt-homebrew.casks) regardless
of whether it's unversioned or it updates itself.
'';
};

brews = mkOption {
type = with types; listOf (coercedTo str (name: { inherit name; }) (submodule brewOptions));
default = [ ];
Expand Down