Experimental nix expression to package all MacOS casks from homebrew automatically.
It relies on nix 2.19 due to using builtins.convertHash
. So make sure you have that or newer.
As of writing this on 2024-05-04, nixos-unstable seems to come with nix 2.18.2
nix run
wont work, so you should install them first.nix build github:BatteredBunny/brew-nix#blender
./result/Applications/Blender.app/Contents/MacOS/Blender
See examples/flake.nix
.
# flake.nix
inputs = {
brew-nix = {
url = "github:BatteredBunny/brew-nix";
inputs.brew-api.follows = "brew-api";
};
brew-api = {
url = "github:BatteredBunny/brew-api";
flake = false;
};
};
# home.nix
nixpkgs = {
overlays = [
inputs.brew-nix.overlays.default
];
};
home.packages = with pkgs; [
nixVersions.latest # if your nix version is under 2.19
brewCasks.marta
brewCasks."firefox@developer-edition" # Casks with special characters in their name need to be defined in quotes
];