Closed jonasschultheiss closed 4 months ago
I think I take it from your comment that you know about the casks.<name>.greedy
nix-darwin option, so your questions are (a) why can't greedy be on by default? and (b) is there some other way to make it easier to automatically update the casks?
I think the answer to (a) is that defaulting to auto-update casks would run counter to the other defaults that avoid updating things when running darwin-rebuild switch
. To me, the current defaults make sense: I'd like darwin-rebuild switch
to in essence be a no-op unless I have changed the nix configuration files it is building from.
As for (b), one idea that comes to mind is a little helper function that you map over your list of casks. For example:
let
mkGreedy = caskName: { name = caskName; greedy = true; };
in
{
homebrew.casks = map mkGreedy [
"google-chrome"
"another-cask"
"etc"
];
}
thank you, makes sense :)
When running
darwin-rebuild switch
homebrew casks wont get updated. This is fine for things like a browser which I use often, but less used apps will get outdated. Using a declarative system I'd appreciate it, if all my software were to update with said command. Is there a reason why this doesn't happen? Addinggreedy
to all casks would probably fix this, but IMO this should be default behaviour. If this is because only greedy ones don't upgrade automatically, would it be possible to add a flag higher up to enable greedy upgrades instead of having to pass this to every cask? The command used to upgrade homebrew cask isbrew upgrade --cask --greedy