From 4defd577d31d50cf510d72232586c18a7e993db8 Mon Sep 17 00:00:00 2001 From: Christoph Schmatzler Date: Mon, 23 Mar 2026 09:25:05 +0000 Subject: [PATCH] refactor(darwin): install GUI apps via homebrew --- modules/darwin.nix | 3 +++ modules/desktop.nix | 21 ++++++++++++++------- modules/hosts/chidi.nix | 6 +++--- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/modules/darwin.nix b/modules/darwin.nix index 62bd2bf..e5bd1d8 100644 --- a/modules/darwin.nix +++ b/modules/darwin.nix @@ -141,10 +141,13 @@ homebrew = { enable = true; casks = [ + "1password" "alcove" + "aerospace" "aqua-voice" "ghostty@tip" "helium-browser" + "raycast" "tidal" ]; }; diff --git a/modules/desktop.nix b/modules/desktop.nix index 0442a9f..fe0ccc8 100644 --- a/modules/desktop.nix +++ b/modules/desktop.nix @@ -3,15 +3,12 @@ lib, pkgs, ... - }: { - home.packages = with pkgs; - lib.optionals stdenv.isDarwin [ - _1password-gui - raycast - ]; - + }: let + aerospaceApp = "/Applications/AeroSpace.app/Contents/MacOS/AeroSpace"; + in { programs.aerospace = { enable = true; + package = pkgs.emptyDirectory; launchd.enable = true; settings = { start-at-login = true; @@ -150,5 +147,15 @@ }; }; }; + + home.file.".aerospace.toml".onChange = + lib.mkForce '' + if [ -x "${aerospaceApp}" ]; then + echo "AeroSpace config changed, reloading..." + "${aerospaceApp}" reload-config || true + fi + ''; + + launchd.agents.aerospace.config.Program = lib.mkForce aerospaceApp; }; } diff --git a/modules/hosts/chidi.nix b/modules/hosts/chidi.nix index ae12218..b1676ae 100644 --- a/modules/hosts/chidi.nix +++ b/modules/hosts/chidi.nix @@ -13,7 +13,7 @@ (den.lib.perHost { includes = [den.aspects.host-darwin-base]; - darwin = {pkgs, ...}: { + darwin = {...}: { networking.hostName = "chidi"; networking.computerName = "chidi"; @@ -24,8 +24,8 @@ path = "/run/secrets/opencode-api-key"; }; - environment.systemPackages = with pkgs; [ - slack + homebrew.casks = [ + "slack" ]; }; })