From d882bbe2f2f93a3c2d35a8822b51f70b321408b4 Mon Sep 17 00:00:00 2001 From: Yan Lin Date: Fri, 13 Feb 2026 07:05:33 +0100 Subject: [PATCH] simplify darwin defaults --- hosts/darwin/home-default.nix | 25 +++---------------------- hosts/darwin/system-default.nix | 5 ----- 2 files changed, 3 insertions(+), 27 deletions(-) diff --git a/hosts/darwin/home-default.nix b/hosts/darwin/home-default.nix index 3a73a4d..8894d6d 100644 --- a/hosts/darwin/home-default.nix +++ b/hosts/darwin/home-default.nix @@ -26,16 +26,14 @@ silent = true; }; - # Firefox configuration programs.firefox-custom = { enable = true; - package = null; # Use system Firefox on Darwin + package = null; }; - # Ghostty configuration programs.ghostty-custom = { enable = true; - package = null; # Use Homebrew-installed Ghostty on Darwin + package = null; windowMode = "windowed"; }; @@ -45,7 +43,6 @@ programs.home-manager.enable = true; - # darwin-specific alias programs.zsh.shellAliases = { oss = "sudo darwin-rebuild switch --flake ~/.config/nix#$(hostname)"; }; @@ -68,7 +65,6 @@ rsync ]; - # Startup applications via launchd agents launchd.agents.snipaste = { enable = true; config = { @@ -123,10 +119,7 @@ }; }; - # File associations configuration (macOS equivalent of xdg.mimeApps) - # Uses duti to set default applications for file types via Launch Services home.activation.setFileAssociations = config.lib.dag.entryAfter ["writeBoundary"] '' - # Text and code files - open with TextMate run ${pkgs.duti}/bin/duti -s com.apple.TextEdit .txt all run ${pkgs.duti}/bin/duti -s com.apple.TextEdit .md all run ${pkgs.duti}/bin/duti -s com.apple.TextEdit .markdown all @@ -165,14 +158,9 @@ run ${pkgs.duti}/bin/duti -s com.apple.TextEdit .vim all run ${pkgs.duti}/bin/duti -s com.apple.TextEdit .tex all run ${pkgs.duti}/bin/duti -s com.apple.TextEdit .bib all - - # Documents run ${pkgs.duti}/bin/duti -s com.apple.Preview .pdf all - - # Diagrams - Draw.io + run ${pkgs.duti}/bin/duti -s org.inkscape.Inkscape .svg all run ${pkgs.duti}/bin/duti -s com.jgraph.drawio.desktop .drawio all - - # Images - Preview run ${pkgs.duti}/bin/duti -s com.apple.Preview .png all run ${pkgs.duti}/bin/duti -s com.apple.Preview .jpg all run ${pkgs.duti}/bin/duti -s com.apple.Preview .jpeg all @@ -184,11 +172,6 @@ run ${pkgs.duti}/bin/duti -s com.apple.Preview .heic all run ${pkgs.duti}/bin/duti -s com.apple.Preview .heif all run ${pkgs.duti}/bin/duti -s com.apple.Preview .ico all - - # SVG - Inkscape - run ${pkgs.duti}/bin/duti -s org.inkscape.Inkscape .svg all - - # Videos - IINA run ${pkgs.duti}/bin/duti -s com.colliderli.iina .mp4 all run ${pkgs.duti}/bin/duti -s com.colliderli.iina .mkv all run ${pkgs.duti}/bin/duti -s com.colliderli.iina .avi all @@ -199,8 +182,6 @@ run ${pkgs.duti}/bin/duti -s com.colliderli.iina .m4v all run ${pkgs.duti}/bin/duti -s com.colliderli.iina .mpg all run ${pkgs.duti}/bin/duti -s com.colliderli.iina .mpeg all - - # Audio - IINA run ${pkgs.duti}/bin/duti -s com.colliderli.iina .mp3 all run ${pkgs.duti}/bin/duti -s com.colliderli.iina .m4a all run ${pkgs.duti}/bin/duti -s com.colliderli.iina .flac all diff --git a/hosts/darwin/system-default.nix b/hosts/darwin/system-default.nix index 029080e..6942529 100644 --- a/hosts/darwin/system-default.nix +++ b/hosts/darwin/system-default.nix @@ -155,19 +155,15 @@ brews = [ ]; casks = [ - # Development "ghostty" "ovito" - # Internet & Network "clash-verge-rev" "firefox" "keepassxc" "tailscale-app" - # Media "calibre" "iina" "musicbrainz-picard" - # Productivity "drawio" "inkscape" "microsoft-excel" @@ -177,7 +173,6 @@ "obsidian" "slidepilot" "zotero" - # Utilities "aerospace" "hiddenbar" "keycastr"