diff --git a/flake.lock b/flake.lock index 0d2f764..85048f7 100644 --- a/flake.lock +++ b/flake.lock @@ -1,5 +1,22 @@ { "nodes": { + "brew-src": { + "flake": false, + "locked": { + "lastModified": 1769363988, + "narHash": "sha256-BiGPeulrDVetXP+tjxhMcGLUROZAtZIhU5m4MqawCfM=", + "owner": "Homebrew", + "repo": "brew", + "rev": "d01011cac6d72032c75fd2cd9489909e95d9faf2", + "type": "github" + }, + "original": { + "owner": "Homebrew", + "ref": "5.0.12", + "repo": "brew", + "type": "github" + } + }, "home-manager": { "inputs": { "nixpkgs": [ @@ -20,6 +37,38 @@ "type": "github" } }, + "homebrew-cask": { + "flake": false, + "locked": { + "lastModified": 1773852247, + "narHash": "sha256-AkpNFDmNNOPlhKIwuPNyHXAS/1s54SmBOls9fWj6oeM=", + "owner": "homebrew", + "repo": "homebrew-cask", + "rev": "a004af186494cfc80bf4894ebdddc0ccea8a2751", + "type": "github" + }, + "original": { + "owner": "homebrew", + "repo": "homebrew-cask", + "type": "github" + } + }, + "homebrew-core": { + "flake": false, + "locked": { + "lastModified": 1773849948, + "narHash": "sha256-CgI0Ma92BhAVXP+G9nb9Oe4zJuOrX6UWDRg88of5v14=", + "owner": "homebrew", + "repo": "homebrew-core", + "rev": "de21bcfa40ae1a5dd99cd791ee8f3cef6b75a54c", + "type": "github" + }, + "original": { + "owner": "homebrew", + "repo": "homebrew-core", + "type": "github" + } + }, "nix-darwin": { "inputs": { "nixpkgs": [ @@ -40,6 +89,24 @@ "type": "github" } }, + "nix-homebrew": { + "inputs": { + "brew-src": "brew-src" + }, + "locked": { + "lastModified": 1769437432, + "narHash": "sha256-8d7KnCpT2LweRvSzZYEGd9IM3eFX+A78opcnDM0+ndk=", + "owner": "zhaofengli-wip", + "repo": "nix-homebrew", + "rev": "a5409abd0d5013d79775d3419bcac10eacb9d8c5", + "type": "github" + }, + "original": { + "owner": "zhaofengli-wip", + "repo": "nix-homebrew", + "type": "github" + } + }, "nixpkgs": { "locked": { "lastModified": 1773628058, @@ -59,7 +126,10 @@ "root": { "inputs": { "home-manager": "home-manager", + "homebrew-cask": "homebrew-cask", + "homebrew-core": "homebrew-core", "nix-darwin": "nix-darwin", + "nix-homebrew": "nix-homebrew", "nixpkgs": "nixpkgs", "rust-overlay": "rust-overlay" } diff --git a/flake.nix b/flake.nix index 1470ef4..e9cc553 100644 --- a/flake.nix +++ b/flake.nix @@ -18,9 +18,20 @@ url = "github:oxalica/rust-overlay"; inputs.nixpkgs.follows = "nixpkgs"; }; + + nix-homebrew.url = "github:zhaofengli-wip/nix-homebrew"; + + homebrew-core = { + url = "github:homebrew/homebrew-core"; + flake = false; + }; + homebrew-cask = { + url = "github:homebrew/homebrew-cask"; + flake = false; + }; }; - outputs = { self, nixpkgs, nix-darwin, home-manager, rust-overlay }: + outputs = { self, nixpkgs, nix-darwin, home-manager, rust-overlay, nix-homebrew, homebrew-core, homebrew-cask }: let system = "aarch64-darwin"; @@ -36,6 +47,20 @@ specialArgs = { inherit rust-overlay; }; modules = [ home-manager.darwinModules.home-manager + nix-homebrew.darwinModules.nix-homebrew + { + nix-homebrew = { + enable = true; + enableRosetta = true; + user = "atridad"; + autoMigrate = true; + taps = { + "homebrew/homebrew-core" = homebrew-core; + "homebrew/homebrew-cask" = homebrew-cask; + }; + mutableTaps = false; + }; + } ./modules/system.nix ./modules/packages/cli.nix ./modules/packages/languages.nix diff --git a/modules/homebrew.nix b/modules/homebrew.nix index d6b7949..410a083 100644 --- a/modules/homebrew.nix +++ b/modules/homebrew.nix @@ -5,30 +5,25 @@ enable = true; onActivation = { - autoUpdate = true; + autoUpdate = false; upgrade = true; cleanup = "zap"; }; taps = [ - "supersonic-app/supersonic" + "homebrew/core" + "homebrew/cask" ]; brews = [ - "gamdl" "knock" "snort" ]; casks = [ - "android-platform-tools" - "flutter" "ghostty" "librewolf" - "ngrok" "pearcleaner" - "zed" - "supersonic" "calibre" ]; }; diff --git a/modules/packages/cli.nix b/modules/packages/cli.nix index ae98024..bd4ade9 100644 --- a/modules/packages/cli.nix +++ b/modules/packages/cli.nix @@ -12,5 +12,7 @@ qrencode sl upx + android-tools + zed-editor ]; } diff --git a/modules/packages/languages.nix b/modules/packages/languages.nix index 2838810..6fb615a 100644 --- a/modules/packages/languages.nix +++ b/modules/packages/languages.nix @@ -19,5 +19,6 @@ in go nil nixd + flutter ]; } diff --git a/modules/packages/media.nix b/modules/packages/media.nix index 642ec41..690da22 100644 --- a/modules/packages/media.nix +++ b/modules/packages/media.nix @@ -4,5 +4,6 @@ environment.systemPackages = with pkgs; [ ffmpeg tectonic + supersonic ]; } diff --git a/modules/packages/networking.nix b/modules/packages/networking.nix index ef21425..54fd4f8 100644 --- a/modules/packages/networking.nix +++ b/modules/packages/networking.nix @@ -6,5 +6,6 @@ nikto john rustscan + ngrok ]; }