Skip to content

Text Input

Everything under System Settings › Keyboard › Text Input, as Nix options. Each one is named after the control you'd click, and set under programs.nix-plist-manager.options in home-manager.

8 options 6 verified against System Settings

System Settings › Keyboard › Text Input › Input Sources › Edit… › Add period with double-space

home-manager · per user ✓ Verified on macOS 27
applications.systemSettings.keyboard.textInput.addPeriodWithDoubleSpace = true;

true or false "unset" puts back macOS's default.

Where it's stored and what runs
  • NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled

For false:

/usr/bin/defaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool false || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool false' >&2
/usr/bin/defaults -currentHost delete NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled 2>/dev/null || true

For true:

/usr/bin/defaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool true || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled -bool true' >&2
/usr/bin/defaults -currentHost delete NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled 2>/dev/null || true

For unset:

/usr/bin/defaults delete NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled 2>/dev/null || true
/usr/bin/defaults -currentHost delete NSGlobalDomain NSAutomaticPeriodSubstitutionEnabled 2>/dev/null || true

Edit… › Automatically switch to a document’s input source

Section titled “Edit… › Automatically switch to a document’s input source”

System Settings › Keyboard › Text Input › Input Sources › Edit… › Automatically switch to a document’s input source

home-manager · per user Not verified
applications.systemSettings.keyboard.textInput.automaticallySwitchToADocumentsInputSource = true;

true or false

Where it's stored and what runs
  • com.apple.HIToolbox AppleGlobalTextInputProperties

For false:

/usr/bin/defaults write com.apple.HIToolbox AppleGlobalTextInputProperties -dict-add TextInputGlobalPropertyPerContextInput -bool false || echo 'nix-plist-manager: failed: /usr/bin/defaults write com.apple.HIToolbox AppleGlobalTextInputProperties -dict-add TextInputGlobalPropertyPerContextInput -bool false' >&2
/usr/bin/defaults -currentHost delete com.apple.HIToolbox AppleGlobalTextInputProperties 2>/dev/null || true

For true:

/usr/bin/defaults write com.apple.HIToolbox AppleGlobalTextInputProperties -dict-add TextInputGlobalPropertyPerContextInput -bool true || echo 'nix-plist-manager: failed: /usr/bin/defaults write com.apple.HIToolbox AppleGlobalTextInputProperties -dict-add TextInputGlobalPropertyPerContextInput -bool true' >&2
/usr/bin/defaults -currentHost delete com.apple.HIToolbox AppleGlobalTextInputProperties 2>/dev/null || true

Edit… › Capitalize words automatically

Section titled “Edit… › Capitalize words automatically”

System Settings › Keyboard › Text Input › Input Sources › Edit… › Capitalize words automatically

home-manager · per user ✓ Verified on macOS 27
applications.systemSettings.keyboard.textInput.capitalizeWordsAutomatically = true;

true or false "unset" puts back macOS's default.

Where it's stored and what runs
  • NSGlobalDomain NSAutomaticCapitalizationEnabled

For false:

/usr/bin/defaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool false || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool false' >&2
/usr/bin/defaults -currentHost delete NSGlobalDomain NSAutomaticCapitalizationEnabled 2>/dev/null || true

For true:

/usr/bin/defaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool true || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain NSAutomaticCapitalizationEnabled -bool true' >&2
/usr/bin/defaults -currentHost delete NSGlobalDomain NSAutomaticCapitalizationEnabled 2>/dev/null || true

For unset:

/usr/bin/defaults delete NSGlobalDomain NSAutomaticCapitalizationEnabled 2>/dev/null || true
/usr/bin/defaults -currentHost delete NSGlobalDomain NSAutomaticCapitalizationEnabled 2>/dev/null || true

Edit… › Correct spelling automatically

Section titled “Edit… › Correct spelling automatically”

System Settings › Keyboard › Text Input › Input Sources › Edit… › Correct spelling automatically

home-manager · per user ✓ Verified on macOS 27
applications.systemSettings.keyboard.textInput.correctSpellingAutomatically = true;

true or false "unset" puts back macOS's default.

Where it's stored and what runs
  • NSGlobalDomain NSAutomaticSpellingCorrectionEnabled
  • NSGlobalDomain WebAutomaticSpellingCorrectionEnabled

For false:

/usr/bin/defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false' >&2
/usr/bin/defaults write NSGlobalDomain WebAutomaticSpellingCorrectionEnabled -bool false || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain WebAutomaticSpellingCorrectionEnabled -bool false' >&2
/usr/bin/defaults -currentHost delete NSGlobalDomain NSAutomaticSpellingCorrectionEnabled 2>/dev/null || true
/usr/bin/defaults -currentHost delete NSGlobalDomain WebAutomaticSpellingCorrectionEnabled 2>/dev/null || true

For true:

/usr/bin/defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool true || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool true' >&2
/usr/bin/defaults write NSGlobalDomain WebAutomaticSpellingCorrectionEnabled -bool true || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain WebAutomaticSpellingCorrectionEnabled -bool true' >&2
/usr/bin/defaults -currentHost delete NSGlobalDomain NSAutomaticSpellingCorrectionEnabled 2>/dev/null || true
/usr/bin/defaults -currentHost delete NSGlobalDomain WebAutomaticSpellingCorrectionEnabled 2>/dev/null || true

For unset:

/usr/bin/defaults delete NSGlobalDomain NSAutomaticSpellingCorrectionEnabled 2>/dev/null || true
/usr/bin/defaults delete NSGlobalDomain WebAutomaticSpellingCorrectionEnabled 2>/dev/null || true
/usr/bin/defaults -currentHost delete NSGlobalDomain NSAutomaticSpellingCorrectionEnabled 2>/dev/null || true
/usr/bin/defaults -currentHost delete NSGlobalDomain WebAutomaticSpellingCorrectionEnabled 2>/dev/null || true

System Settings › Keyboard › Text Input › Input Sources › Edit… › All Input Sources

home-manager · per user Not verified

The keyboard layouts and input methods to have, by input source id, e.g. [ "com.apple.keylayout.US" "com.apple.keylayout.ABC" ]; the others are removed. nix run .#current lists the ones in use.

applications.systemSettings.keyboard.textInput.inputSources = [
"…"
];

A list of strings

Where it's stored and what runs
  • com.apple.HIToolbox AppleEnabledInputSources

For ["…"]:

/usr/bin/osascript -l JavaScript -e 'ObjC.import('\''Carbon'\'');var wanted = ["…"];var id = function (source) { return ObjC.castRefToObject($.TISGetInputSourceProperty(source, $.kTISPropertyInputSourceID)).js; };var isKeyboard = function (source) { return ObjC.castRefToObject($.TISGetInputSourceProperty(source, $.kTISPropertyInputSourceCategory)).js == '\''TISCategoryKeyboardInputSource'\''; };var all = ObjC.castRefToObject($.TISCreateInputSourceList($(), true));var sources = []; for (var i = 0; i < all.count; i++) sources.push(all.objectAtIndex(i));sources.forEach(function (source) { if (wanted.indexOf(id(source)) >= 0) $.TISEnableInputSource(source); });var enabled = ObjC.castRefToObject($.TISCreateInputSourceList($(), false));for (var i = 0; i < enabled.count; i++) { var source = enabled.objectAtIndex(i); if (isKeyboard(source) && wanted.indexOf(id(source)) < 0) $.TISDisableInputSource(source); }' >/dev/null
/usr/bin/defaults -currentHost delete com.apple.HIToolbox AppleEnabledInputSources 2>/dev/null || true

System Settings › Keyboard › Text Input › Input Sources › Edit… › Show inline predictive text

home-manager · per user ✓ Verified on macOS 27
applications.systemSettings.keyboard.textInput.showInlinePredictiveText = true;

true or false "unset" puts back macOS's default.

Where it's stored and what runs
  • NSGlobalDomain NSAutomaticInlinePredictionEnabled

For false:

/usr/bin/defaults write NSGlobalDomain NSAutomaticInlinePredictionEnabled -bool false || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain NSAutomaticInlinePredictionEnabled -bool false' >&2
/usr/bin/defaults -currentHost delete NSGlobalDomain NSAutomaticInlinePredictionEnabled 2>/dev/null || true

For true:

/usr/bin/defaults write NSGlobalDomain NSAutomaticInlinePredictionEnabled -bool true || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain NSAutomaticInlinePredictionEnabled -bool true' >&2
/usr/bin/defaults -currentHost delete NSGlobalDomain NSAutomaticInlinePredictionEnabled 2>/dev/null || true

For unset:

/usr/bin/defaults delete NSGlobalDomain NSAutomaticInlinePredictionEnabled 2>/dev/null || true
/usr/bin/defaults -currentHost delete NSGlobalDomain NSAutomaticInlinePredictionEnabled 2>/dev/null || true

System Settings › Keyboard › Text Input › Input Sources › Edit… › Show suggested replies

home-manager · per user ✓ Verified on macOS 27
applications.systemSettings.keyboard.textInput.showSuggestedReplies = true;

true or false "unset" puts back macOS's default.

Where it's stored and what runs
  • NSGlobalDomain NSSmartReplyEnabled

For false:

/usr/bin/defaults write NSGlobalDomain NSSmartReplyEnabled -bool false || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain NSSmartReplyEnabled -bool false' >&2
/usr/bin/defaults -currentHost delete NSGlobalDomain NSSmartReplyEnabled 2>/dev/null || true

For true:

/usr/bin/defaults write NSGlobalDomain NSSmartReplyEnabled -bool true || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain NSSmartReplyEnabled -bool true' >&2
/usr/bin/defaults -currentHost delete NSGlobalDomain NSSmartReplyEnabled 2>/dev/null || true

For unset:

/usr/bin/defaults delete NSGlobalDomain NSSmartReplyEnabled 2>/dev/null || true
/usr/bin/defaults -currentHost delete NSGlobalDomain NSSmartReplyEnabled 2>/dev/null || true

System Settings › Keyboard › Text Input › Input Sources › Edit… › Use smart quotes and dashes

home-manager · per user ✓ Verified on macOS 27
applications.systemSettings.keyboard.textInput.useSmartQuotesAndDashes = true;

true or false "unset" puts back macOS's default.

Where it's stored and what runs
  • NSGlobalDomain NSAutomaticDashSubstitutionEnabled
  • NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled

For false:

/usr/bin/defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool false' >&2
/usr/bin/defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool false' >&2
/usr/bin/defaults -currentHost delete NSGlobalDomain NSAutomaticDashSubstitutionEnabled 2>/dev/null || true
/usr/bin/defaults -currentHost delete NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled 2>/dev/null || true

For true:

/usr/bin/defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool true || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain NSAutomaticDashSubstitutionEnabled -bool true' >&2
/usr/bin/defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool true || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled -bool true' >&2
/usr/bin/defaults -currentHost delete NSGlobalDomain NSAutomaticDashSubstitutionEnabled 2>/dev/null || true
/usr/bin/defaults -currentHost delete NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled 2>/dev/null || true

For unset:

/usr/bin/defaults delete NSGlobalDomain NSAutomaticDashSubstitutionEnabled 2>/dev/null || true
/usr/bin/defaults delete NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled 2>/dev/null || true
/usr/bin/defaults -currentHost delete NSGlobalDomain NSAutomaticDashSubstitutionEnabled 2>/dev/null || true
/usr/bin/defaults -currentHost delete NSGlobalDomain NSAutomaticQuoteSubstitutionEnabled 2>/dev/null || true