Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

targets.darwin.copyApps.enable

Whether to enable copying macOS applications to the user environment (works with Spotlight).

Type: boolean

Default:

pkgs.stdenv.hostPlatform.isDarwin && (lib.versionAtLeast config.home.stateVersion "25.11")

Example:

true

Declared by:

targets.darwin.copyApps.enableChecks

Whether to enable enable App Management checks.

Type: boolean

Default:

true

Example:

true

Declared by:

targets.darwin.copyApps.directory

Path to link apps relative to the home directory.

Type: string

Default:

"Applications/Home Manager Apps"

Declared by:

targets.darwin.currentHostDefaults

Set macOS user defaults. Unlike targets.darwin.defaults, the preferences will only be applied to the currently logged-in host. This distinction is important for networked accounts.

Values set to null are ignored.

Warning: Some settings might require a re-login to take effect.

Type: open submodule of attribute set of attribute set of anything

Default:

{ }

Example:

{
  "com.apple.controlcenter" = {
    BatteryShowPercentage = true;
  };
}

Declared by:

targets.darwin.currentHostDefaults.“com.apple.controlcenter”.BatteryShowPercentage

Whether to show battery percentage in the menu bar.

Type: null or boolean

Default:

null

Example:

true

Declared by:

targets.darwin.defaults

Set macOS user defaults. Values set to null are ignored.

Warning: Some settings might require a re-login to take effect.

Warning: Some settings are only read from targets.darwin.currentHostDefaults.

Type: open submodule of attribute set of attribute set of anything

Default:

{ }

Example:

{
  "com.apple.desktopservices" = {
    DSDontWriteNetworkStores = true;
    DSDontWriteUSBStores = true;
  };
}

Declared by:

targets.darwin.defaults.NSGlobalDomain.AppleLanguages

Sets the language to use in the preferred order.

Type: null or (list of string)

Default:

null

Example:

[
  "en"
]

Declared by:

targets.darwin.defaults.NSGlobalDomain.AppleLocale

Configures the user locale.

Type: null or string

Default:

null

Example:

"en_US"

Declared by:

targets.darwin.defaults.NSGlobalDomain.AppleMeasurementUnits

Sets the measurement unit.

Type: null or one of “Centimeters”, “Inches”

Default:

null

Example:

"Centimeters"

Declared by:

targets.darwin.defaults.NSGlobalDomain.AppleMetricUnits

Whether to enable the metric system.

Type: null or boolean

Default:

null

Example:

true

Declared by:

targets.darwin.defaults.NSGlobalDomain.ApplePressAndHoldEnabled

Repeat a key when it is held down (false) or display the accented character selector (true)

Type: null or boolean

Default:

null

Example:

true

Declared by:

targets.darwin.defaults.NSGlobalDomain.AppleShowAllExtensions

Always show file extensions in Finder

Type: null or boolean

Default:

null

Example:

true

Declared by:

targets.darwin.defaults.NSGlobalDomain.AppleTemperatureUnit

Sets the temperature unit.

Type: null or one of “Celsius”, “Fahrenheit”

Default:

null

Example:

"Celsius"

Declared by:

targets.darwin.defaults.NSGlobalDomain.KeyRepeat

Interval between key repetitions when holding down a key. Lower is faster. When setting through the control panel, 2 is the lowest value, and 120 the highest.

Type: null or signed integer

Default:

null

Example:

2

Declared by:

targets.darwin.defaults.NSGlobalDomain.NSAutomaticCapitalizationEnabled

Whether to enable automatic capitalization.

Type: null or boolean

Default:

null

Example:

true

Declared by:

targets.darwin.defaults.NSGlobalDomain.NSAutomaticDashSubstitutionEnabled

Whether to enable smart dashes.

Type: null or boolean

Default:

null

Example:

true

Declared by:

targets.darwin.defaults.NSGlobalDomain.NSAutomaticPeriodSubstitutionEnabled

Whether to enable period with double space.

Type: null or boolean

Default:

null

Example:

true

Declared by:

targets.darwin.defaults.NSGlobalDomain.NSAutomaticQuoteSubstitutionEnabled

Whether to enable smart quotes.

Type: null or boolean

Default:

null

Example:

true

Declared by:

targets.darwin.defaults.NSGlobalDomain.NSAutomaticSpellingCorrectionEnabled

Whether to enable spelling correction.

Type: null or boolean

Default:

null

Example:

true

Declared by:

targets.darwin.defaults.“com.apple.Safari”.AutoFillCreditCardData

Whether to enable autofill of credit card numbers.

Type: null or boolean

Default:

null

Example:

true

Declared by:

targets.darwin.defaults.“com.apple.Safari”.AutoFillPasswords

Whether to enable autofill of usernames and passwords.

Type: null or boolean

Default:

null

Example:

true

Declared by:

targets.darwin.defaults.“com.apple.Safari”.AutoOpenSafeDownloads

Whether to enable opening of downloaded files.

Type: null or boolean

Default:

null

Example:

true

Declared by:

targets.darwin.defaults.“com.apple.Safari”.IncludeDevelopMenu

Whether to enable “Develop” menu in the menu bar.

Type: null or boolean

Default:

null

Example:

true

Declared by:

targets.darwin.defaults.“com.apple.Safari”.ShowOverlayStatusBar

Whether to enable status bar.

Type: null or boolean

Default:

null

Example:

true

Declared by:

targets.darwin.defaults.“com.apple.Safari”.WebKitDeveloperExtrasEnabledPreferenceKey

Configures the web inspector.

Warning: Instead of setting this option directly, set IncludeDevelopMenu instead.

Type: null or boolean

Default:

null

Declared by:

targets.darwin.defaults.“com.apple.Safari”.“WebKitPreferences.developerExtrasEnabled”

Configures the web inspector.

Warning: Instead of setting this option directly, set IncludeDevelopMenu instead.

Type: null or boolean

Default:

null

Declared by:

targets.darwin.defaults.“com.apple.Safari.SandboxBroker”.ShowDevelopMenu

Show the “Develop” menu in Safari’s menubar.

Warning: Instead of setting this option directly, set "com.apple.Safari".IncludeDevelopMenu instead.

Type: null or boolean

Default:

null

Declared by:

targets.darwin.defaults.“com.apple.desktopservices”.DSDontWriteNetworkStores

Disable use of .DS_Store files on network shares. See the official article for more info.

Type: null or boolean

Default:

null

Example:

false

Declared by:

targets.darwin.defaults.“com.apple.desktopservices”.DSDontWriteUSBStores

Disable use of .DS_Store files on thumb drives.

Type: null or boolean

Default:

null

Example:

false

Declared by:

targets.darwin.defaults.“com.apple.dock”.autohide

Hide the Dock automatically

Type: null or boolean

Default:

null

Example:

true

Declared by:

targets.darwin.defaults.“com.apple.dock”.expose-group-apps

Whether to enable grouping of windows by application in Mission Control.

Type: null or boolean

Default:

null

Example:

true

Declared by:

targets.darwin.defaults.“com.apple.dock”.orientation

Position of the Dock on the screen

Type: null or one of “left”, “bottom”, “right”

Default:

null

Example:

"left"

Declared by:

targets.darwin.defaults.“com.apple.dock”.size-immutable

Whether to enable locking of the dock size.

Type: null or boolean

Default:

null

Example:

true

Declared by:

targets.darwin.defaults.“com.apple.dock”.tilesize

Sets the size of the dock.

Type: null or signed integer

Default:

null

Example:

64

Declared by:

targets.darwin.defaults.“com.apple.finder”.AppleShowAllFiles

Show hidden files in Finder

Type: null or boolean

Default:

null

Example:

true

Declared by:

targets.darwin.defaults.“com.apple.finder”.FXRemoveOldTrashItems

Automatically delete items from trash after 30 days

Type: null or boolean

Default:

null

Example:

true

Declared by:

targets.darwin.defaults.“com.apple.finder”.ShowPathBar

Show the path bar at the bottom of a Finder window

Type: null or boolean

Default:

null

Example:

true

Declared by:

targets.darwin.defaults.“com.apple.finder”.ShowStatusBar

Show the status bar at the bottom of a Finder window

Type: null or boolean

Default:

null

Example:

true

Declared by:

targets.darwin.defaults.“com.apple.menuextra.battery”.ShowPercent

This option no longer works on macOS 11 and later. Instead, use targets.darwin.currentHostDefaults.\"com.apple.controlcenter\".BatteryShowPercentage.

Whether to show battery percentage in the menu bar.

Type: null or one of “YES”, “NO”

Default:

null

Example:

"NO"

Declared by:

targets.darwin.defaults.“com.apple.menuextra.clock”.IsAnalog

Whether to enable showing an analog clock instead of a digital one.

Type: null or boolean

Default:

null

Example:

true

Declared by:

targets.darwin.defaults.“com.apple.menuextra.clock”.Show24Hour

Whether to enable showing a 24-hour clock, instead of a 12-hour clock.

Type: null or boolean

Default:

null

Example:

true

Declared by:

targets.darwin.defaults.“com.apple.menuextra.clock”.ShowAMPM

Show the AM/PM label. Useful if Show24Hour is false. Default is null.

Type: null or boolean

Default:

null

Declared by:

targets.darwin.defaults.“com.apple.menuextra.clock”.ShowDate

Show the full date. Default is null.

0 = When Space Allows 1 = Always 2 = Never

Type: null or one of 0, 1, 2

Default:

null

Declared by:

targets.darwin.defaults.“com.apple.menuextra.clock”.ShowDayOfMonth

Whether to enable showing the day of the month.

Type: null or boolean

Default:

null

Example:

true

Declared by:

targets.darwin.defaults.“com.apple.menuextra.clock”.ShowDayOfWeek

Whether to enable showing the day of the week.

Type: null or boolean

Default:

null

Example:

true

Declared by:

targets.darwin.defaults.“com.apple.menuextra.clock”.ShowSeconds

Whether to enable showing the clock with second precision, instead of minutes.

Type: null or boolean

Default:

null

Example:

true

Declared by:

targets.darwin.defaults.“com.googlecode.iterm2”.AddNewTabAtEndOfTabs

Whether to enable placement of new tabs at the end of the tab bar.

Type: null or boolean

Default:

null

Example:

true

Declared by:

targets.darwin.defaults.“com.googlecode.iterm2”.AlternateMouseScroll

Whether to enable arrow keys when scrolling in alternate screen mode.

Type: null or boolean

Default:

null

Example:

true

Declared by:

targets.darwin.defaults.“com.googlecode.iterm2”.CopySelection

Whether to enable copy to clipboard upon selecting text.

Type: null or boolean

Default:

null

Example:

true

Declared by:

targets.darwin.defaults.“com.googlecode.iterm2”.ExperimentalKeyHandling

Whether to enable experimental key handling for AquaSKK compatibility.

Type: null or boolean

Default:

null

Example:

true

Declared by:

targets.darwin.defaults.“com.googlecode.iterm2”.OpenTmuxWindowsIn

Configures how to restore tmux windows when attaching to a session.

Possible Values

  • 0

    Native windows

  • 1

    Native tabs in a new window

  • 2

    Tabs in the attaching window

Type: null or signed integer

Default:

null

Example:

2

Declared by:

targets.darwin.keybindings

This will configure the default keybindings for text fields in macOS applications. See Apple’s documentation for more details.

Warning: Existing keybinding configuration will be wiped when using this option.

Type: attribute set of anything

Default:

{ }

Example:

{
  "^u" = "deleteToBeginningOfLine:";
  "^w" = "deleteWordBackward:";
}

Declared by:

targets.darwin.linkApps.enable

Whether to enable linking macOS applications to the user environment.

Type: boolean

Default:

pkgs.stdenv.hostPlatform.isDarwin && (lib.versionOlder config.home.stateVersion "25.11")

Example:

true

Declared by:

targets.darwin.linkApps.directory

Path to link apps relative to the home directory.

Type: string

Default:

"Applications/Home Manager Apps"

Declared by:

targets.darwin.search

Default search engine.

Type: null or one of “Bing”, “DuckDuckGo”, “Ecosia”, “Google”, “Yahoo”

Default:

null

Declared by:

targets.genericLinux.enable

Whether to enable settings that make Home Manager work better on GNU/Linux distributions other than NixOS.

Type: boolean

Default:

false

Example:

true

Declared by:

targets.genericLinux.gpu.enable

Whether to enable GPU driver integration for non-NixOS systems.

Type: boolean

Default:

config.targets.genericLinux.enable && config.targets.genericLinux.nixGL.packages == null

Example:

true

Declared by:

targets.genericLinux.gpu.packages

The Nixpkgs package set where drivers are taken from.

Type: attribute set

Default:

pkgs

Declared by:

targets.genericLinux.gpu.nixStateDirectory

The path to the Nix state directory. This only needs to be changed from default if the path was overridden, e.g., by setting the NIX_STATE_DIR environment variable.

Type: absolute path

Default:

"/nix/var/nix"

Example:

"/var/lib/nix"

Declared by:

targets.genericLinux.gpu.nvidia.enable

Whether to enable proprietary Nvidia drivers.

Type: boolean

Default:

false

Example:

true

Declared by:

targets.genericLinux.gpu.nvidia.sha256

The hash of the downloaded driver file. It can be obtained by running, for example,

nix store prefetch-file https://download.nvidia.com/XFree86/Linux-x86_64/@VERSION@/NVIDIA-Linux-x86_64-@VERSION@.run

where @VERSION@ is replaced with the exact driver version. If you are on ARM, replace Linux-x86_64 with Linux-aarch64.

Type: null or string matching the pattern sha256-.*=

Default:

null

Example:

"sha256-hfK1D5EiYcGRegss9+H5dDr/0Aj9wPIJ9NVWP3dNUC0="

Declared by:

targets.genericLinux.gpu.nvidia.version

The exact version of Nvidia drivers to use. This version must match the version of the driver used by the host OS.

Type: null or string matching the pattern [0-9]{3}\.[0-9]{2,3}(\.[0-9]{2,3})?

Default:

null

Example:

"550.163.01"

Declared by:

targets.genericLinux.gpu.setupPackage

Resulting setup package.

Type: package (read only)

Declared by:

targets.genericLinux.nixGL.packages

The nixGL package set containing GPU library wrappers. This can be used to provide OpenGL and Vulkan access to applications on non-NixOS systems by using (config.lib.nixGL.wrap <package>) for the default wrapper, or (config.lib.nixGL.wrappers.<wrapper> <package>) for any available wrapper.

The wrapper functions are always available. If this option is empty (the default), they are a no-op. This is useful on NixOS where the wrappers are unnecessary.

Note that using any Nvidia wrapper requires building the configuration with the --impure option.

Type: null or (attribute set)

Default:

null

Example:

inputs.nixGL.packages

Declared by:

targets.genericLinux.nixGL.defaultWrapper

The package wrapper function available for use as (config.lib.nixGL.wrap <package>). Intended to start programs on the main GPU.

Wrapper functions can be found under config.lib.nixGL.wrappers. They can be used directly, however, setting this option provides a convenient shorthand.

The following wrappers are available:

  • mesa
  • mesaPrime
  • nvidia
  • nvidiaPrime

Type: one of “mesa”, “mesaPrime”, “nvidia”, “nvidiaPrime”

Default:

"mesa"

Declared by:

targets.genericLinux.nixGL.installScripts

For each wrapper wrp named in the provided list, a wrapper script named nixGLWrp is installed into the environment. These scripts are useful for running programs not installed via Home Manager.

The following wrappers are available:

  • mesa
  • mesaPrime
  • nvidia
  • nvidiaPrime

Type: null or (list of (one of “mesa”, “mesaPrime”, “nvidia”, “nvidiaPrime”))

Default:

null

Example:

[
  "mesa"
  "mesaPrime"
]

Declared by:

targets.genericLinux.nixGL.offloadWrapper

The package wrapper function available for use as (config.lib.nixGL.wrapOffload <package>). Intended to start programs on the secondary GPU.

Wrapper functions can be found under config.lib.nixGL.wrappers. They can be used directly, however, setting this option provides a convenient shorthand.

The following wrappers are available:

  • mesa
  • mesaPrime
  • nvidia
  • nvidiaPrime

Type: one of “mesa”, “mesaPrime”, “nvidia”, “nvidiaPrime”

Default:

"mesaPrime"

Declared by:

targets.genericLinux.nixGL.prime.card

Selects the non-default graphics card used for PRIME render offloading. The value can be:

  • a number, selecting the n-th non-default GPU;
  • a PCI bus id in the form pci-XXX_YY_ZZ_U;
  • a PCI id in the form vendor_id:device_id

For more information, consult the Mesa documentation on the DRI_PRIME environment variable.

Type: string

Default:

"1"

Example:

"pci-0000_06_00_0"

Declared by:

targets.genericLinux.nixGL.prime.installScript

If this option is set, the wrapper script prime-offload is installed into the environment. It allows starting programs on the secondary GPU selected by the nixGL.prime.card option. This makes sense when the program is not already using one of nixGL PRIME wrappers, or for programs not installed from Nixpkgs.

This option can be set to either “mesa” or “nvidia”, making the script use one or the other graphics library.

Type: null or one of “mesa”, “nvidia”

Default:

null

Example:

"mesa"

Declared by:

targets.genericLinux.nixGL.prime.nvidiaProvider

If this option is set, it overrides the offload provider for Nvidia PRIME offloading. Consult the proprietary Nvidia driver documentation on the __NV_PRIME_RENDER_OFFLOAD_PROVIDER environment variable.

Type: null or string

Default:

null

Example:

"NVIDIA-G0"

Declared by:

targets.genericLinux.nixGL.vulkan.enable

Whether to enable Vulkan in nixGL wrappers.

This is disabled by default because Vulkan brings in several libraries that can cause symbol version conflicts in wrapped programs. Your mileage may vary.

Type: boolean

Default:

false

Example:

true

Declared by: