about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2024-03-04 13:49:09 -0800
committerFranck Cuny <franck@fcuny.net>2024-03-04 13:49:09 -0800
commitcb60d123ec417712bbe33d1bfd3b49464cbad7ec (patch)
treefeffe728f41b16d3e8851010d9b6eee9a16fd6e8
parentexpand configuration for vscode (diff)
downloadworld-cb60d123ec417712bbe33d1bfd3b49464cbad7ec.tar.gz
extract shared code for darwin to a new module
-rw-r--r--hosts/common/darwin/homebrew.nix36
-rw-r--r--hosts/mba/default.nix34
-rw-r--r--nix/flake/hosts.nix1
3 files changed, 37 insertions, 34 deletions
diff --git a/hosts/common/darwin/homebrew.nix b/hosts/common/darwin/homebrew.nix
new file mode 100644
index 0000000..0a7a2c9
--- /dev/null
+++ b/hosts/common/darwin/homebrew.nix
@@ -0,0 +1,36 @@
+{ ... }:
+{
+  # Required for homebrew on aarch64
+  environment.systemPath = [ "/opt/homebrew/bin" "/opt/homebrew/sbin" ];
+
+  homebrew = {
+    enable = true;
+    onActivation.autoUpdate = true;
+    onActivation.upgrade = true;
+
+    brews = [
+      "aspell" # spelling
+      "kind" # to run local k8s cluster
+      "envoy" # to do some testing with envoy
+    ];
+
+    taps = [
+      "homebrew/cask-fonts"
+    ];
+
+    casks = [
+      "1password-cli"
+      "docker"
+      "element"
+      "emacs"
+      "font-monaspace" # https://github.com/githubnext/monaspace
+      "font-source-code-pro"
+      "iterm2"
+      "netnewswire"
+      "transmission"
+      "vlc"
+      "wireshark"
+      "zoom"
+    ];
+  };
+}
diff --git a/hosts/mba/default.nix b/hosts/mba/default.nix
index 55e8ffd..8b22923 100644
--- a/hosts/mba/default.nix
+++ b/hosts/mba/default.nix
@@ -14,40 +14,6 @@
 
   programs.zsh.enable = true;
 
-  # Required for homebrew on aarch64
-  environment.systemPath = [ "/opt/homebrew/bin" "/opt/homebrew/sbin" ];
-
-  homebrew = {
-    enable = true;
-    onActivation.autoUpdate = true;
-    onActivation.upgrade = true;
-
-    brews = [
-      "aspell" # spelling
-      "kind" # to run local k8s cluster
-      "envoy" # to do some testing with envoy
-    ];
-
-    taps = [
-      "homebrew/cask-fonts"
-    ];
-
-    casks = [
-      "1password-cli"
-      "docker"
-      "element"
-      "emacs"
-      "font-monaspace" # https://github.com/githubnext/monaspace
-      "font-source-code-pro"
-      "iterm2"
-      "netnewswire"
-      "transmission"
-      "vlc"
-      "wireshark"
-      "zoom"
-    ];
-  };
-
   users.users.fcuny.home = "/Users/fcuny";
 
   system.defaults.dock.autohide = true;
diff --git a/nix/flake/hosts.nix b/nix/flake/hosts.nix
index e3d1fff..e84a389 100644
--- a/nix/flake/hosts.nix
+++ b/nix/flake/hosts.nix
@@ -8,6 +8,7 @@ let
       inherit system;
       modules = [
         home-manager.darwinModule
+        ../../hosts/common/darwin/homebrew.nix
         path
         {
           nixpkgs.overlays = [