summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Schanzenbacher <ryan@rschanz.org>2026-06-25 00:14:18 -0400
committerRyan Schanzenbacher <ryan@rschanz.org>2026-06-25 00:14:18 -0400
commitb46d42c560eb97f214d0b767c0ffee44711ecfba (patch)
treef466d9bd29cfda61769f5d66cc48a4c50d4d5b9b
parent06f4083f0d8f521dfde6e1961de8354b6df4a92e (diff)
Various changes. Homebrew is now fully declarative
-rw-r--r--flake.lock70
-rw-r--r--flake.nix21
-rw-r--r--hosts/RyanMac/configuration.nix23
-rw-r--r--hosts/RyanMac/taps.nix16
-rw-r--r--users/ryan/home.nix1
5 files changed, 120 insertions, 11 deletions
diff --git a/flake.lock b/flake.lock
index 8905305..fad022e 100644
--- a/flake.lock
+++ b/flake.lock
@@ -1,5 +1,22 @@
1{ 1{
2 "nodes": { 2 "nodes": {
3 "brew-src": {
4 "flake": false,
5 "locked": {
6 "lastModified": 1781226006,
7 "narHash": "sha256-w4ZTuOnhYiDxjaynrMTASzp802QblBWmo3wpB8wVN4Y=",
8 "owner": "Homebrew",
9 "repo": "brew",
10 "rev": "109191be4988470b51a60a5ef1998520aa24c01b",
11 "type": "github"
12 },
13 "original": {
14 "owner": "Homebrew",
15 "ref": "6.0.1",
16 "repo": "brew",
17 "type": "github"
18 }
19 },
3 "darwin": { 20 "darwin": {
4 "inputs": { 21 "inputs": {
5 "nixpkgs": [ 22 "nixpkgs": [
@@ -161,6 +178,38 @@
161 "type": "github" 178 "type": "github"
162 } 179 }
163 }, 180 },
181 "homebrew-cask": {
182 "flake": false,
183 "locked": {
184 "lastModified": 1782355557,
185 "narHash": "sha256-LjoFTRTn/SxBKSPLX5c1FPJrh0fcR6CPRa2OoRDx6dA=",
186 "owner": "homebrew",
187 "repo": "homebrew-cask",
188 "rev": "dabdc97cde3fc9b28db4864dc94697670aab42c3",
189 "type": "github"
190 },
191 "original": {
192 "owner": "homebrew",
193 "repo": "homebrew-cask",
194 "type": "github"
195 }
196 },
197 "homebrew-core": {
198 "flake": false,
199 "locked": {
200 "lastModified": 1782356982,
201 "narHash": "sha256-yhSKSuq4qlcrgxxtRqvdNYJaS5PiLS11Sj+rYrcz134=",
202 "owner": "homebrew",
203 "repo": "homebrew-core",
204 "rev": "3c02d2ed3e52772e24ec557142d3a575e574ab5b",
205 "type": "github"
206 },
207 "original": {
208 "owner": "homebrew",
209 "repo": "homebrew-core",
210 "type": "github"
211 }
212 },
164 "nix": { 213 "nix": {
165 "inputs": { 214 "inputs": {
166 "flake-parts": "flake-parts", 215 "flake-parts": "flake-parts",
@@ -182,6 +231,24 @@
182 "url": "https://flakehub.com/f/DeterminateSystems/nix-src/%2A" 231 "url": "https://flakehub.com/f/DeterminateSystems/nix-src/%2A"
183 } 232 }
184 }, 233 },
234 "nix-homebrew": {
235 "inputs": {
236 "brew-src": "brew-src"
237 },
238 "locked": {
239 "lastModified": 1781389246,
240 "narHash": "sha256-ORqLAo/hoJdsZC7UPAuEHev6S0+XIqKEC7vjo5prz1k=",
241 "owner": "zhaofengli",
242 "repo": "nix-homebrew",
243 "rev": "de7953a08ed4bb9245be043e468561c17b89130d",
244 "type": "github"
245 },
246 "original": {
247 "owner": "zhaofengli",
248 "repo": "nix-homebrew",
249 "type": "github"
250 }
251 },
185 "nixpkgs": { 252 "nixpkgs": {
186 "locked": { 253 "locked": {
187 "lastModified": 1773222311, 254 "lastModified": 1773222311,
@@ -263,6 +330,9 @@
263 "darwin": "darwin", 330 "darwin": "darwin",
264 "determinate": "determinate", 331 "determinate": "determinate",
265 "home-manager": "home-manager", 332 "home-manager": "home-manager",
333 "homebrew-cask": "homebrew-cask",
334 "homebrew-core": "homebrew-core",
335 "nix-homebrew": "nix-homebrew",
266 "nixpkgs": "nixpkgs_3", 336 "nixpkgs": "nixpkgs_3",
267 "zen-browser": "zen-browser" 337 "zen-browser": "zen-browser"
268 } 338 }
diff --git a/flake.nix b/flake.nix
index b7d3714..c75f436 100644
--- a/flake.nix
+++ b/flake.nix
@@ -16,9 +16,18 @@
16 url = "github:0xc000022070/zen-browser-flake"; 16 url = "github:0xc000022070/zen-browser-flake";
17 inputs = { 17 inputs = {
18 nixpkgs.follows = "nixpkgs"; 18 nixpkgs.follows = "nixpkgs";
19 home-manager.follows = "home-manager"; 19 home-manager.follows = "home-manager";
20 }; 20 };
21 }; 21 };
22 nix-homebrew.url = "github:zhaofengli/nix-homebrew";
23 homebrew-core = {
24 url = "github:homebrew/homebrew-core";
25 flake = false;
26 };
27 homebrew-cask = {
28 url = "github:homebrew/homebrew-cask";
29 flake = false;
30 };
22 }; 31 };
23 32
24 outputs = { nixpkgs, home-manager, ... }@inputs: { 33 outputs = { nixpkgs, home-manager, ... }@inputs: {
@@ -34,11 +43,11 @@
34 home-manager.useGlobalPkgs = true; 43 home-manager.useGlobalPkgs = true;
35 home-manager.useUserPackages = true; 44 home-manager.useUserPackages = true;
36 home-manager.users.ryan = { 45 home-manager.users.ryan = {
37 imports = [ 46 imports = [
38 inputs.zen-browser.homeModules.beta 47 inputs.zen-browser.homeModules.beta
39 ./users/ryan/home.nix 48 ./users/ryan/home.nix
40 ]; 49 ];
41 }; 50 };
42 } 51 }
43 ]; 52 ];
44 }; 53 };
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
4 4
5 defaultBrowser = "zen"; 5 defaultBrowser = "zen";
6 6
7 thirdPartyTaps = import ./taps.nix;
8
7 pinnedNixpkgs = pkgs.writeText "flake-registry.json" (builtins.toJSON { 9 pinnedNixpkgs = pkgs.writeText "flake-registry.json" (builtins.toJSON {
8 version = 2; 10 version = 2;
9 flakes = [ 11 flakes = [
@@ -41,6 +43,7 @@ let
41in { 43in {
42 # Modules 44 # Modules
43 imports = [ 45 imports = [
46 inputs.nix-homebrew.darwinModules.nix-homebrew
44 ../../modules/darwin/random-wallpaper.nix 47 ../../modules/darwin/random-wallpaper.nix
45 ]; 48 ];
46 49
@@ -107,28 +110,38 @@ in {
107 zsh.enable = true; 110 zsh.enable = true;
108 }; 111 };
109 112
113 # Install homebrew itself
114 nix-homebrew = {
115 enable = true;
116 enableRosetta = true;
117 user = "${username}";
118 mutableTaps = false;
119 taps = thirdPartyTaps;
120 trust.taps = builtins.attrNames thirdPartyTaps;
121 };
122
110 # Install homebrew casks/apps 123 # Install homebrew casks/apps
111 homebrew = { 124 homebrew = {
112 enable = true; 125 enable = true;
113 126
114 onActivation = { 127 onActivation = {
115 cleanup = "zap"; 128 cleanup = "zap";
116 extraFlags = [ "--force-cleanup" ];
117 }; 129 };
118 130
119 taps = [ 131 global.brewfile = true;
120 "netbirdio/tap" 132
121 "FelixKratz/formulae" 133 taps = builtins.attrNames thirdPartyTaps;
122 ];
123 134
124 brews = [ 135 brews = [
125 "borders" 136 "borders"
137 "mqttx-cli"
126 ]; 138 ];
127 139
128 casks = [ 140 casks = [
129 "utm" 141 "utm"
130 "ghostty" 142 "ghostty"
131 "zen" 143 "zen"
144 "ungoogled-chromium"
132 "tailscale-app" 145 "tailscale-app"
133 "netbird-ui" 146 "netbird-ui"
134 ]; 147 ];
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 @@
1{
2 "netbirdio/homebrew-tap" = builtins.fetchGit {
3 url = "https://github.com/netbirdio/homebrew-tap";
4 rev = "98a5d193c8d2c03b639aad03159004c64496c3e7";
5 };
6
7 "FelixKratz/homebrew-formulae" = builtins.fetchGit {
8 url = "https://github.com/FelixKratz/homebrew-formulae";
9 rev = "70b2071488b61c14f773ce9e1bf6626ee851981a";
10 };
11
12 "emqx/homebrew-mqttx" = builtins.fetchGit {
13 url = "https://github.com/emqx/homebrew-mqttx";
14 rev = "9889d741ba44940340d12dcad31fe867f62e7ea8";
15 };
16}
diff --git a/users/ryan/home.nix b/users/ryan/home.nix
index 9ff5870..a83257b 100644
--- a/users/ryan/home.nix
+++ b/users/ryan/home.nix
@@ -131,6 +131,7 @@
131 talosctl 131 talosctl
132 audacity 132 audacity
133 ffmpeg 133 ffmpeg
134 blender
134 ]; 135 ];
135 136
136 # Home Manager is pretty good at managing dotfiles. The primary way to manage 137 # Home Manager is pretty good at managing dotfiles. The primary way to manage