Add homebrew
This commit is contained in:
parent
d81c541c97
commit
2a2e053d62
6 changed files with 88 additions and 3 deletions
24
modules/homebrew.nix
Normal file
24
modules/homebrew.nix
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# Homebrew configuration for package management
|
||||
homebrew = {
|
||||
enable = true;
|
||||
onActivation = {
|
||||
autoUpdate = true;
|
||||
cleanup = "zap"; # Removes unlisted formulae/casks
|
||||
upgrade = true;
|
||||
};
|
||||
brews = [
|
||||
# Command-line tools go here
|
||||
# Example: "wget"
|
||||
];
|
||||
casks = [
|
||||
# GUI applications go here
|
||||
# Example: "google-chrome"
|
||||
];
|
||||
taps = [
|
||||
# Additional repositories if needed
|
||||
];
|
||||
};
|
||||
}
|
||||
11
modules/nix-homebrew.nix
Normal file
11
modules/nix-homebrew.nix
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{ config, pkgs, ... }:
|
||||
|
||||
{
|
||||
# nix-homebrew configuration for declarative Homebrew installation
|
||||
nix-homebrew = {
|
||||
enable = true;
|
||||
enableRosetta = true; # Apple Silicon support
|
||||
user = "yanlin";
|
||||
autoMigrate = true; # Migrate existing Homebrew if present
|
||||
};
|
||||
}
|
||||
|
|
@ -113,6 +113,8 @@ in
|
|||
|
||||
app_path=$( (find -L /Applications -name "*.app" -maxdepth 2 2>/dev/null; \
|
||||
find -L ~/Applications -name "*.app" -maxdepth 3 2>/dev/null; \
|
||||
find -L /opt/homebrew/Caskroom -name "*.app" -maxdepth 3 2>/dev/null; \
|
||||
find -L /usr/local/Caskroom -name "*.app" -maxdepth 3 2>/dev/null; \
|
||||
find /System/Applications -name "*.app" -maxdepth 2 2>/dev/null; \
|
||||
find /System/Applications/Utilities -name "*.app" -maxdepth 1 2>/dev/null) |
|
||||
sort | uniq |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue