Skip to content

Battery

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

5 options 5 verified against System Settings

System Settings › Battery › Energy Mode › On battery

nix-darwin · system-wide ✓ Verified on macOS 27
applications.systemSettings.battery.energyMode.onBattery = "Automatic";

One of: "Automatic""High Power""Low Power"

Where it's stored and what runs
  • /Library/Preferences/com.apple.PowerManagement Battery Power

For Automatic:

/usr/bin/pmset -b powermode 0

For High Power:

/usr/bin/pmset -b powermode 2

For Low Power:

/usr/bin/pmset -b powermode 1

System Settings › Battery › Energy Mode › On power adapter

nix-darwin · system-wide ✓ Verified on macOS 27
applications.systemSettings.battery.energyMode.onPowerAdapter = "Automatic";

One of: "Automatic""High Power""Low Power"

Where it's stored and what runs
  • /Library/Preferences/com.apple.PowerManagement AC Power

For Automatic:

/usr/bin/pmset -c powermode 0

For High Power:

/usr/bin/pmset -c powermode 2

For Low Power:

/usr/bin/pmset -c powermode 1

Prevent automatic sleeping on power adapter when the display is off

Section titled “Prevent automatic sleeping on power adapter when the display is off”

System Settings › Battery › Options… › Prevent automatic sleeping on power adapter when the display is off

nix-darwin · system-wide ✓ Verified on macOS 27
applications.systemSettings.battery.options.preventAutomaticSleepingOnPowerAdapterWhenTheDisplayIsOff = true;

true or false

Where it's stored and what runs
  • /Library/Preferences/com.apple.PowerManagement AC Power

For false:

/usr/bin/pmset -c sleep 1

For true:

/usr/bin/pmset -c sleep 0

System Settings › Battery › Options… › Slightly dim the display on battery

nix-darwin · system-wide ✓ Verified on macOS 27
applications.systemSettings.battery.options.slightlyDimTheDisplayOnBattery = true;

true or false

Where it's stored and what runs
  • /Library/Preferences/com.apple.PowerManagement Battery Power

For false:

/usr/bin/pmset -b lessbright 0

For true:

/usr/bin/pmset -b lessbright 1

System Settings › Battery › Options… › Wake for network access

nix-darwin · system-wide ✓ Verified on macOS 27
applications.systemSettings.battery.options.wakeForNetworkAccess = "Always";

One of: "Always""Never""Only on Power Adapter"

Where it's stored and what runs
  • /Library/Preferences/com.apple.PowerManagement AC Power
  • /Library/Preferences/com.apple.PowerManagement Battery Power

For Always:

/usr/bin/pmset -b womp 1
/usr/bin/pmset -c womp 1

For Never:

/usr/bin/pmset -b womp 0
/usr/bin/pmset -c womp 0

For Only on Power Adapter:

/usr/bin/pmset -b womp 0
/usr/bin/pmset -c womp 1

What this pane shows that can’t be declared, and why:

4 settings
  • Current Source › UPS — only with a UPS attached
  • Options › Automatic Graphics Switching — only on Intel Macs with two GPUs
  • Options… › Optimize video streaming while on battery — not kept in a readable preference file; changing it writes none
  • Options › Power Nap — not offered on Apple silicon (pmset powernap)