mirror of
https://github.com/LnL7/nix-darwin.git
synced 2024-12-14 11:57:34 +00:00
88 lines
4.7 KiB
Nix
88 lines
4.7 KiB
Nix
{ config, pkgs, lib, ... }:
|
|
|
|
{
|
|
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.NSAutomaticCapitalizationEnabled = 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;
|
|
system.defaults.NSGlobalDomain.NSWindowResizeTime = 0.01;
|
|
system.defaults.NSGlobalDomain.NSWindowShouldDragOnGesture = true;
|
|
system.defaults.NSGlobalDomain.InitialKeyRepeat = 10;
|
|
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;
|
|
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";
|
|
system.defaults.menuExtraClock.Show24Hour = false;
|
|
system.defaults.menuExtraClock.ShowDayOfWeek = true;
|
|
system.defaults.menuExtraClock.ShowDate = 2;
|
|
system.defaults.dock.appswitcher-all-displays = false;
|
|
system.defaults.dock.autohide-delay = 0.24;
|
|
system.defaults.dock.orientation = "left";
|
|
system.defaults.dock.persistent-apps = ["MyApp.app" "Cool.app"];
|
|
system.defaults.dock.persistent-others = ["~/Documents" "~/Downloads/file.txt"];
|
|
system.defaults.screencapture.location = "/tmp";
|
|
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;
|
|
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.CustomUserPreferences = {
|
|
"NSGlobalDomain" = { "TISRomanSwitchState" = 1; };
|
|
"com.apple.Safari" = {
|
|
"com.apple.Safari.ContentPageGroupIdentifier.WebKit2DeveloperExtrasEnabled" =
|
|
true;
|
|
};
|
|
};
|
|
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"
|
|
];
|
|
}
|