fix: mac dock persistent-apps correction

This commit is contained in:
Noah Masur 2024-03-26 12:23:01 -04:00
parent fecd66465d
commit f73c52e2b7

View File

@ -88,6 +88,21 @@
orientation = "bottom"; orientation = "bottom";
show-recents = false; show-recents = false;
tilesize = 44; 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 = { finder = {
@ -130,19 +145,6 @@
"com.apple.dock" = { "com.apple.dock" = {
magnification = true; magnification = true;
largesize = 48; 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 # Require password immediately after screen saver begins
"com.apple.screensaver" = { "com.apple.screensaver" = {
@ -189,16 +191,10 @@
''; '';
# User-level settings # User-level settings
activationScripts.postUserActivation.text = let activationScripts.postUserActivation.text = ''
persistentApps = lib.concatMapStrings (x: ''"'' + x + ''" '')
config.system.defaults.CustomUserPreferences."com.apple.dock".persistent-apps;
in ''
echo "Show the ~/Library folder" echo "Show the ~/Library folder"
chflags nohidden ~/Library chflags nohidden ~/Library
echo "Choose and order dock icons"
defaults write com.apple.dock persistent-apps -array ${persistentApps}
echo "Reduce Menu Bar padding" echo "Reduce Menu Bar padding"
defaults write -globalDomain NSStatusItemSelectionPadding -int 6 defaults write -globalDomain NSStatusItemSelectionPadding -int 6
defaults write -globalDomain NSStatusItemSpacing -int 6 defaults write -globalDomain NSStatusItemSpacing -int 6