1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2024-12-14 11:57:34 +00:00
nix-darwin/tests/system-defaults-write.nix

132 lines
7.1 KiB
Nix
Raw Permalink Normal View History

{ config, pkgs, lib, ... }:
2017-05-13 23:00:29 +00:00
{
system.defaults.NSGlobalDomain.AppleShowAllFiles = true;
system.defaults.NSGlobalDomain.AppleEnableMouseSwipeNavigateWithScrolls = false;
system.defaults.NSGlobalDomain.AppleEnableSwipeNavigateWithScrolls = false;
system.defaults.NSGlobalDomain.AppleFontSmoothing = 1;
system.defaults.NSGlobalDomain.AppleICUForce24HourTime = true;
system.defaults.NSGlobalDomain.AppleKeyboardUIMode = 3;
system.defaults.NSGlobalDomain.ApplePressAndHoldEnabled = true;
system.defaults.NSGlobalDomain.AppleShowAllExtensions = true;
system.defaults.NSGlobalDomain.AppleShowScrollBars = "Always";
system.defaults.NSGlobalDomain.AppleScrollerPagingBehavior = true;
system.defaults.NSGlobalDomain.AppleSpacesSwitchOnActivate = false;
system.defaults.NSGlobalDomain.NSAutomaticCapitalizationEnabled = false;
system.defaults.NSGlobalDomain.NSAutomaticInlinePredictionEnabled = false;
system.defaults.NSGlobalDomain.NSAutomaticDashSubstitutionEnabled = false;
system.defaults.NSGlobalDomain.NSAutomaticPeriodSubstitutionEnabled = false;
system.defaults.NSGlobalDomain.NSAutomaticQuoteSubstitutionEnabled = false;
system.defaults.NSGlobalDomain.NSAutomaticSpellingCorrectionEnabled = false;
system.defaults.NSGlobalDomain.NSAutomaticWindowAnimationsEnabled = false;
system.defaults.NSGlobalDomain.NSDisableAutomaticTermination = true;
system.defaults.NSGlobalDomain.NSDocumentSaveNewDocumentsToCloud = false;
system.defaults.NSGlobalDomain.AppleWindowTabbingMode = "always";
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;
system.defaults.NSGlobalDomain.NSWindowShouldDragOnGesture = true;
system.defaults.NSGlobalDomain.InitialKeyRepeat = 10;
2017-05-13 23:00:29 +00:00
system.defaults.NSGlobalDomain.KeyRepeat = 1;
system.defaults.NSGlobalDomain.PMPrintingExpandedStateForPrint = true;
system.defaults.NSGlobalDomain.PMPrintingExpandedStateForPrint2 = true;
system.defaults.NSGlobalDomain."com.apple.keyboard.fnState" = true;
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;
system.defaults.NSGlobalDomain."com.apple.swipescrolldirection" = true;
system.defaults.".GlobalPreferences"."com.apple.sound.beep.sound" = "/System/Library/Sounds/Funk.aiff";
2024-11-12 01:24:22 +00:00
system.defaults.menuExtraClock.FlashDateSeparators = false;
system.defaults.menuExtraClock.Show24Hour = false;
system.defaults.menuExtraClock.ShowDayOfWeek = true;
system.defaults.menuExtraClock.ShowDate = 2;
system.defaults.dock.expose-group-apps = true;
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";
system.defaults.dock.persistent-apps = ["MyApp.app" "Cool.app"];
system.defaults.dock.persistent-others = ["~/Documents" "~/Downloads/file.txt"];
2024-11-12 01:24:22 +00:00
system.defaults.dock.scroll-to-open = false;
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";
2024-11-12 01:24:22 +00:00
system.defaults.finder.FXRemoveOldTrashItems = false;
2024-09-18 07:57:48 +00:00
system.defaults.finder.AppleShowAllExtensions = true;
system.defaults.finder.CreateDesktop = false;
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;
2024-11-12 01:24:22 +00:00
system.defaults.finder._FXSortFoldersFirstOnDesktop = false;
2024-09-18 07:57:48 +00:00
system.defaults.finder.FXEnableExtensionChangeWarning = false;
2024-11-12 01:24:22 +00:00
system.defaults.finder.ShowExternalHardDrivesOnDesktop = false;
system.defaults.finder.ShowHardDrivesOnDesktop = false;
system.defaults.finder.ShowMountedServersOnDesktop = false;
system.defaults.finder.ShowRemovableMediaOnDesktop = false;
2024-10-28 06:37:08 +00:00
system.defaults.hitoolbox.AppleFnUsageType = "Show Emoji & Symbols";
system.defaults.screencapture.location = "/tmp";
2024-11-12 01:24:22 +00:00
system.defaults.screencapture.include-date = true;
system.defaults.screensaver.askForPassword = true;
system.defaults.screensaver.askForPasswordDelay = 5;
system.defaults.smb.NetBIOSName = "IMAC-000000";
system.defaults.smb.ServerDescription = ''Darwin\\\\U2019's iMac'';
system.defaults.universalaccess.mouseDriverCursorSize = 1.5;
2024-01-03 08:58:18 +00:00
system.defaults.universalaccess.reduceMotion = true;
system.defaults.universalaccess.reduceTransparency = true;
system.defaults.universalaccess.closeViewScrollWheelToggle = true;
system.defaults.universalaccess.closeViewZoomFollowsFocus = true;
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;
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.EnableTiledWindowMargins = true;
system.defaults.WindowManager.StandardHideWidgets = true;
system.defaults.WindowManager.StageManagerHideWidgets = true;
system.defaults.CustomUserPreferences = {
2024-09-18 07:57:48 +00:00
"NSGlobalDomain" = { "TISRomanSwitchState" = 1; };
"com.apple.Safari" = {
"com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled" =
true;
};
2024-09-18 07:57:48 +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
'') [
"activate"
"activate-user"
];
2017-05-13 23:00:29 +00:00
}