2023-10-11 06:10:58 +00:00
|
|
|
{ config, pkgs, lib, ... }:
|
2017-05-13 23:00:29 +00:00
|
|
|
|
|
|
|
{
|
2022-03-11 02:24:26 +00:00
|
|
|
system.defaults.NSGlobalDomain.AppleShowAllFiles = true;
|
2020-11-15 06:51:54 +00:00
|
|
|
system.defaults.NSGlobalDomain.AppleEnableMouseSwipeNavigateWithScrolls = false;
|
|
|
|
system.defaults.NSGlobalDomain.AppleEnableSwipeNavigateWithScrolls = false;
|
2018-01-04 02:59:50 +00:00
|
|
|
system.defaults.NSGlobalDomain.AppleFontSmoothing = 1;
|
2022-02-02 22:38:55 +00:00
|
|
|
system.defaults.NSGlobalDomain.AppleICUForce24HourTime = true;
|
2018-01-04 02:59:50 +00:00
|
|
|
system.defaults.NSGlobalDomain.AppleKeyboardUIMode = 3;
|
|
|
|
system.defaults.NSGlobalDomain.ApplePressAndHoldEnabled = true;
|
|
|
|
system.defaults.NSGlobalDomain.AppleShowAllExtensions = true;
|
|
|
|
system.defaults.NSGlobalDomain.AppleShowScrollBars = "Always";
|
2023-05-26 17:02:23 +00:00
|
|
|
system.defaults.NSGlobalDomain.AppleScrollerPagingBehavior = true;
|
2024-09-04 21:03:14 +00:00
|
|
|
system.defaults.NSGlobalDomain.AppleSpacesSwitchOnActivate = false;
|
2018-01-04 02:59:50 +00:00
|
|
|
system.defaults.NSGlobalDomain.NSAutomaticCapitalizationEnabled = false;
|
2024-06-08 15:10:29 +00:00
|
|
|
system.defaults.NSGlobalDomain.NSAutomaticInlinePredictionEnabled = false;
|
2018-01-04 02:59:50 +00:00
|
|
|
system.defaults.NSGlobalDomain.NSAutomaticDashSubstitutionEnabled = false;
|
|
|
|
system.defaults.NSGlobalDomain.NSAutomaticPeriodSubstitutionEnabled = false;
|
|
|
|
system.defaults.NSGlobalDomain.NSAutomaticQuoteSubstitutionEnabled = false;
|
|
|
|
system.defaults.NSGlobalDomain.NSAutomaticSpellingCorrectionEnabled = false;
|
2022-01-25 04:06:13 +00:00
|
|
|
system.defaults.NSGlobalDomain.NSAutomaticWindowAnimationsEnabled = false;
|
2018-01-04 02:59:50 +00:00
|
|
|
system.defaults.NSGlobalDomain.NSDisableAutomaticTermination = true;
|
|
|
|
system.defaults.NSGlobalDomain.NSDocumentSaveNewDocumentsToCloud = false;
|
2023-05-26 17:37:34 +00:00
|
|
|
system.defaults.NSGlobalDomain.AppleWindowTabbingMode = "always";
|
2018-01-04 02:59:50 +00:00
|
|
|
system.defaults.NSGlobalDomain.NSNavPanelExpandedStateForSaveMode = true;
|
|
|
|
system.defaults.NSGlobalDomain.NSNavPanelExpandedStateForSaveMode2 = true;
|
|
|
|
system.defaults.NSGlobalDomain.NSTableViewDefaultSizeMode = 2;
|
|
|
|
system.defaults.NSGlobalDomain.NSTextShowsControlCharacters = true;
|
|
|
|
system.defaults.NSGlobalDomain.NSUseAnimatedFocusRing = false;
|
|
|
|
system.defaults.NSGlobalDomain.NSScrollAnimationEnabled = true;
|
2022-08-29 22:39:16 +00:00
|
|
|
system.defaults.NSGlobalDomain.NSWindowResizeTime = 0.01;
|
2024-02-28 13:44:09 +00:00
|
|
|
system.defaults.NSGlobalDomain.NSWindowShouldDragOnGesture = true;
|
2018-01-04 02:59:50 +00:00
|
|
|
system.defaults.NSGlobalDomain.InitialKeyRepeat = 10;
|
2017-05-13 23:00:29 +00:00
|
|
|
system.defaults.NSGlobalDomain.KeyRepeat = 1;
|
2018-01-04 02:59:50 +00:00
|
|
|
system.defaults.NSGlobalDomain.PMPrintingExpandedStateForPrint = true;
|
|
|
|
system.defaults.NSGlobalDomain.PMPrintingExpandedStateForPrint2 = true;
|
2019-07-22 15:05:48 +00:00
|
|
|
system.defaults.NSGlobalDomain."com.apple.keyboard.fnState" = true;
|
2018-01-04 02:59:50 +00:00
|
|
|
system.defaults.NSGlobalDomain."com.apple.mouse.tapBehavior" = 1;
|
|
|
|
system.defaults.NSGlobalDomain."com.apple.trackpad.enableSecondaryClick" = true;
|
|
|
|
system.defaults.NSGlobalDomain."com.apple.trackpad.trackpadCornerClickBehavior" = 1;
|
|
|
|
system.defaults.NSGlobalDomain."com.apple.springing.enabled" = true;
|
2022-08-29 22:39:16 +00:00
|
|
|
system.defaults.NSGlobalDomain."com.apple.springing.delay" = 0.0;
|
2018-01-04 02:59:50 +00:00
|
|
|
system.defaults.NSGlobalDomain."com.apple.swipescrolldirection" = true;
|
2019-08-19 14:02:59 +00:00
|
|
|
system.defaults.".GlobalPreferences"."com.apple.sound.beep.sound" = "/System/Library/Sounds/Funk.aiff";
|
2023-05-15 17:18:38 +00:00
|
|
|
system.defaults.menuExtraClock.Show24Hour = false;
|
|
|
|
system.defaults.menuExtraClock.ShowDayOfWeek = true;
|
|
|
|
system.defaults.menuExtraClock.ShowDate = 2;
|
2022-08-20 15:32:11 +00:00
|
|
|
system.defaults.dock.appswitcher-all-displays = false;
|
2022-08-29 22:39:16 +00:00
|
|
|
system.defaults.dock.autohide-delay = 0.24;
|
2017-05-13 23:00:29 +00:00
|
|
|
system.defaults.dock.orientation = "left";
|
2023-03-20 16:22:41 +00:00
|
|
|
system.defaults.dock.persistent-apps = ["MyApp.app" "Cool.app"];
|
2024-05-15 06:49:00 +00:00
|
|
|
system.defaults.dock.persistent-others = ["~/Documents" "~/Downloads/file.txt"];
|
2024-09-18 07:57:48 +00:00
|
|
|
system.defaults.finder.AppleShowAllFiles = true;
|
|
|
|
system.defaults.finder.ShowStatusBar = true;
|
|
|
|
system.defaults.finder.ShowPathbar = true;
|
|
|
|
system.defaults.finder.FXDefaultSearchScope = "SCcf";
|
|
|
|
system.defaults.finder.FXPreferredViewStyle = "Flwv";
|
|
|
|
system.defaults.finder.AppleShowAllExtensions = true;
|
|
|
|
system.defaults.finder.CreateDesktop = false;
|
2024-10-25 20:21:56 +00:00
|
|
|
system.defaults.finder.NewWindowTarget = "Other";
|
|
|
|
system.defaults.finder.NewWindowTargetPath = "file:///Library/Apple";
|
2024-09-18 07:57:48 +00:00
|
|
|
system.defaults.finder.QuitMenuItem = true;
|
|
|
|
system.defaults.finder._FXShowPosixPathInTitle = true;
|
|
|
|
system.defaults.finder._FXSortFoldersFirst = true;
|
|
|
|
system.defaults.finder.FXEnableExtensionChangeWarning = false;
|
2024-10-28 06:37:08 +00:00
|
|
|
system.defaults.hitoolbox.AppleFnUsageType = "Show Emoji & Symbols";
|
2018-03-01 20:41:38 +00:00
|
|
|
system.defaults.screencapture.location = "/tmp";
|
2023-04-23 12:11:44 +00:00
|
|
|
system.defaults.screensaver.askForPassword = true;
|
|
|
|
system.defaults.screensaver.askForPasswordDelay = 5;
|
2018-01-17 22:10:57 +00:00
|
|
|
system.defaults.smb.NetBIOSName = "IMAC-000000";
|
2023-10-11 06:10:58 +00:00
|
|
|
system.defaults.smb.ServerDescription = ''Darwin\\\\U2019's iMac'';
|
2023-05-26 16:13:47 +00:00
|
|
|
system.defaults.universalaccess.mouseDriverCursorSize = 1.5;
|
2024-01-03 08:58:18 +00:00
|
|
|
system.defaults.universalaccess.reduceMotion = true;
|
2021-12-24 22:48:08 +00:00
|
|
|
system.defaults.universalaccess.reduceTransparency = true;
|
|
|
|
system.defaults.universalaccess.closeViewScrollWheelToggle = true;
|
|
|
|
system.defaults.universalaccess.closeViewZoomFollowsFocus = true;
|
2022-03-11 02:53:55 +00:00
|
|
|
system.defaults.ActivityMonitor.ShowCategory = 103;
|
|
|
|
system.defaults.ActivityMonitor.IconType = 3;
|
|
|
|
system.defaults.ActivityMonitor.SortColumn = "CPUUsage";
|
|
|
|
system.defaults.ActivityMonitor.SortDirection = 0;
|
|
|
|
system.defaults.ActivityMonitor.OpenMainWindow = true;
|
2024-07-11 12:56:29 +00:00
|
|
|
system.defaults.WindowManager.GloballyEnabled = false;
|
|
|
|
system.defaults.WindowManager.EnableStandardClickToShowDesktop = false;
|
|
|
|
system.defaults.WindowManager.AutoHide = false;
|
|
|
|
system.defaults.WindowManager.AppWindowGroupingBehavior = true;
|
|
|
|
system.defaults.WindowManager.StandardHideDesktopIcons = false;
|
|
|
|
system.defaults.WindowManager.HideDesktop = false;
|
|
|
|
system.defaults.WindowManager.StandardHideWidgets = true;
|
|
|
|
system.defaults.WindowManager.StageManagerHideWidgets = true;
|
2022-10-24 12:12:54 +00:00
|
|
|
system.defaults.CustomUserPreferences = {
|
2024-09-18 07:57:48 +00:00
|
|
|
"NSGlobalDomain" = { "TISRomanSwitchState" = 1; };
|
|
|
|
"com.apple.Safari" = {
|
|
|
|
"com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled" =
|
|
|
|
true;
|
2022-10-24 12:12:54 +00:00
|
|
|
};
|
2024-09-18 07:57:48 +00:00
|
|
|
};
|
2024-11-10 23:12:44 +00:00
|
|
|
system.defaults.controlcenter.BatteryShowPercentage = true;
|
|
|
|
system.defaults.controlcenter.Sound = false;
|
|
|
|
system.defaults.controlcenter.Bluetooth = true;
|
|
|
|
system.defaults.controlcenter.AirDrop = true;
|
|
|
|
system.defaults.controlcenter.Display = false;
|
|
|
|
system.defaults.controlcenter.FocusModes = false;
|
|
|
|
system.defaults.controlcenter.NowPlaying = true;
|
2024-09-18 07:57:48 +00:00
|
|
|
test = lib.strings.concatMapStringsSep "\n"
|
|
|
|
(x: ''
|
|
|
|
echo >&2 "checking defaults write in /${x}"
|
|
|
|
${pkgs.python3}/bin/python3 <<EOL
|
|
|
|
import sys
|
|
|
|
from pathlib import Path
|
|
|
|
fixture = '${./fixtures/system-defaults-write}/${x}.txt'
|
|
|
|
out = '${config.out}/${x}'
|
|
|
|
if Path(fixture).read_text() not in Path(out).read_text():
|
|
|
|
print("Did not find content from %s in %s" % (fixture, out), file=sys.stderr)
|
|
|
|
sys.exit(1)
|
|
|
|
EOL
|
|
|
|
'') [
|
2023-10-11 06:10:58 +00:00
|
|
|
"activate"
|
|
|
|
"activate-user"
|
|
|
|
];
|
2017-05-13 23:00:29 +00:00
|
|
|
}
|