From b46d42c560eb97f214d0b767c0ffee44711ecfba Mon Sep 17 00:00:00 2001 From: Ryan Schanzenbacher Date: Thu, 25 Jun 2026 00:14:18 -0400 Subject: Various changes. Homebrew is now fully declarative --- hosts/RyanMac/configuration.nix | 23 ++++++++++++++++++----- hosts/RyanMac/taps.nix | 16 ++++++++++++++++ 2 files changed, 34 insertions(+), 5 deletions(-) create mode 100644 hosts/RyanMac/taps.nix (limited to 'hosts') diff --git a/hosts/RyanMac/configuration.nix b/hosts/RyanMac/configuration.nix index c964d97..16e1006 100644 --- a/hosts/RyanMac/configuration.nix +++ b/hosts/RyanMac/configuration.nix @@ -4,6 +4,8 @@ let defaultBrowser = "zen"; + thirdPartyTaps = import ./taps.nix; + pinnedNixpkgs = pkgs.writeText "flake-registry.json" (builtins.toJSON { version = 2; flakes = [ @@ -41,6 +43,7 @@ let in { # Modules imports = [ + inputs.nix-homebrew.darwinModules.nix-homebrew ../../modules/darwin/random-wallpaper.nix ]; @@ -107,28 +110,38 @@ in { zsh.enable = true; }; + # Install homebrew itself + nix-homebrew = { + enable = true; + enableRosetta = true; + user = "${username}"; + mutableTaps = false; + taps = thirdPartyTaps; + trust.taps = builtins.attrNames thirdPartyTaps; + }; + # Install homebrew casks/apps homebrew = { enable = true; onActivation = { cleanup = "zap"; - extraFlags = [ "--force-cleanup" ]; }; - taps = [ - "netbirdio/tap" - "FelixKratz/formulae" - ]; + global.brewfile = true; + + taps = builtins.attrNames thirdPartyTaps; brews = [ "borders" + "mqttx-cli" ]; casks = [ "utm" "ghostty" "zen" + "ungoogled-chromium" "tailscale-app" "netbird-ui" ]; diff --git a/hosts/RyanMac/taps.nix b/hosts/RyanMac/taps.nix new file mode 100644 index 0000000..12235d8 --- /dev/null +++ b/hosts/RyanMac/taps.nix @@ -0,0 +1,16 @@ +{ + "netbirdio/homebrew-tap" = builtins.fetchGit { + url = "https://github.com/netbirdio/homebrew-tap"; + rev = "98a5d193c8d2c03b639aad03159004c64496c3e7"; + }; + + "FelixKratz/homebrew-formulae" = builtins.fetchGit { + url = "https://github.com/FelixKratz/homebrew-formulae"; + rev = "70b2071488b61c14f773ce9e1bf6626ee851981a"; + }; + + "emqx/homebrew-mqttx" = builtins.fetchGit { + url = "https://github.com/emqx/homebrew-mqttx"; + rev = "9889d741ba44940340d12dcad31fe867f62e7ea8"; + }; +} -- cgit v1.3