From f73c52e2b78892a0b25298c992655484ff07fcdf Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Tue, 26 Mar 2024 12:23:01 -0400 Subject: [PATCH] fix: mac dock persistent-apps correction --- modules/darwin/system.nix | 36 ++++++++++++++++-------------------- 1 file changed, 16 insertions(+), 20 deletions(-) diff --git a/modules/darwin/system.nix b/modules/darwin/system.nix index 9de6325..5c83c4b 100644 --- a/modules/darwin/system.nix +++ b/modules/darwin/system.nix @@ -88,6 +88,21 @@ orientation = "bottom"; show-recents = false; tilesize = 44; + + persistent-apps = [ + "/Applications/1Password.app" + "${pkgs.slack}/Applications/Slack.app" + "/System/Applications/Calendar.app" + "${pkgs.firefox-bin}/Applications/Firefox.app" + "/System/Applications/Messages.app" + "/System/Applications/Mail.app" + "/Applications/zoom.us.app" + "${pkgs.discord}/Applications/Discord.app" + "${pkgs.obsidian}/Applications/Obsidian.app" + "${pkgs.kitty}/Applications/kitty.app" + "/System/Applications/System Settings.app" + ]; + }; finder = { @@ -130,19 +145,6 @@ "com.apple.dock" = { magnification = true; largesize = 48; - persistent-apps = [ - "/Applications/1Password.app" - "${pkgs.slack}/Applications/Slack.app" - "/System/Applications/Calendar.app" - "${pkgs.firefox-bin}/Applications/Firefox.app" - "/System/Applications/Messages.app" - "/System/Applications/Mail.app" - "/Applications/zoom.us.app" - "${pkgs.discord}/Applications/Discord.app" - "${pkgs.obsidian}/Applications/Obsidian.app" - "${pkgs.kitty}/Applications/kitty.app" - "/System/Applications/System Settings.app" - ]; }; # Require password immediately after screen saver begins "com.apple.screensaver" = { @@ -189,16 +191,10 @@ ''; # User-level settings - activationScripts.postUserActivation.text = let - persistentApps = lib.concatMapStrings (x: ''"'' + x + ''" '') - config.system.defaults.CustomUserPreferences."com.apple.dock".persistent-apps; - in '' + activationScripts.postUserActivation.text = '' echo "Show the ~/Library folder" chflags nohidden ~/Library - echo "Choose and order dock icons" - defaults write com.apple.dock persistent-apps -array ${persistentApps} - echo "Reduce Menu Bar padding" defaults write -globalDomain NSStatusItemSelectionPadding -int 6 defaults write -globalDomain NSStatusItemSpacing -int 6