Skip to content

Lock Screen

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

6 options 6 verified against System Settings

System Settings › Lock Screen › Login window shows

nix-darwin · system-wide ✓ Verified on macOS 27
applications.systemSettings.lockScreen.loginWindowShows = "List of users";

One of: "List of users""Name and password" "unset" puts back macOS's default.

Where it's stored and what runs
  • /Library/Preferences/com.apple.loginwindow SHOWFULLNAME

For List of users:

/usr/bin/defaults write /Library/Preferences/com.apple.loginwindow SHOWFULLNAME -bool false || echo 'nix-plist-manager: failed: /usr/bin/defaults write /Library/Preferences/com.apple.loginwindow SHOWFULLNAME -bool false' >&2

For Name and password:

/usr/bin/defaults write /Library/Preferences/com.apple.loginwindow SHOWFULLNAME -bool true || echo 'nix-plist-manager: failed: /usr/bin/defaults write /Library/Preferences/com.apple.loginwindow SHOWFULLNAME -bool true' >&2

For unset:

/usr/bin/defaults delete /Library/Preferences/com.apple.loginwindow SHOWFULLNAME 2>/dev/null || true

System Settings › Lock Screen › Show password hints

nix-darwin · system-wide ✓ Verified on macOS 27
applications.systemSettings.lockScreen.showPasswordHints = true;

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

Where it's stored and what runs
  • /Library/Preferences/com.apple.loginwindow RetriesUntilHint

For false:

/usr/bin/defaults write /Library/Preferences/com.apple.loginwindow RetriesUntilHint -int 0 || echo 'nix-plist-manager: failed: /usr/bin/defaults write /Library/Preferences/com.apple.loginwindow RetriesUntilHint -int 0' >&2

For true:

/usr/bin/defaults write /Library/Preferences/com.apple.loginwindow RetriesUntilHint -int 3 || echo 'nix-plist-manager: failed: /usr/bin/defaults write /Library/Preferences/com.apple.loginwindow RetriesUntilHint -int 3' >&2

For unset:

/usr/bin/defaults delete /Library/Preferences/com.apple.loginwindow RetriesUntilHint 2>/dev/null || true

Show the Sleep, Restart, and Shut Down buttons

Section titled “Show the Sleep, Restart, and Shut Down buttons”

System Settings › Lock Screen › Show the Sleep, Restart, and Shut Down buttons

nix-darwin · system-wide ✓ Verified on macOS 27
applications.systemSettings.lockScreen.showTheSleepRestartAndShutDownButtons = true;

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

Where it's stored and what runs
  • /Library/Preferences/com.apple.loginwindow PowerOffDisabled

For false:

/usr/bin/defaults write /Library/Preferences/com.apple.loginwindow PowerOffDisabled -bool true || echo 'nix-plist-manager: failed: /usr/bin/defaults write /Library/Preferences/com.apple.loginwindow PowerOffDisabled -bool true' >&2

For true:

/usr/bin/defaults write /Library/Preferences/com.apple.loginwindow PowerOffDisabled -bool false || echo 'nix-plist-manager: failed: /usr/bin/defaults write /Library/Preferences/com.apple.loginwindow PowerOffDisabled -bool false' >&2

For unset:

/usr/bin/defaults delete /Library/Preferences/com.apple.loginwindow PowerOffDisabled 2>/dev/null || true

System Settings › Lock Screen › Turn display off on battery when inactive

nix-darwin · system-wide ✓ Verified on macOS 27
applications.systemSettings.lockScreen.turnDisplayOffOnBatteryWhenInactive = "For 1 hour";

One of: "For 1 hour""For 1 hour, 30 minutes""For 1 minute""For 10 minutes""For 2 hours""For 2 hours, 30 minutes""For 2 minutes""For 20 minutes""For 3 hours""For 3 minutes""For 30 minutes""For 5 minutes""Never"

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

For For 1 hour:

/usr/bin/pmset -b displaysleep 60

For For 1 hour, 30 minutes:

/usr/bin/pmset -b displaysleep 90

For For 1 minute:

/usr/bin/pmset -b displaysleep 1

For For 10 minutes:

/usr/bin/pmset -b displaysleep 10

For For 2 hours:

/usr/bin/pmset -b displaysleep 120

For For 2 hours, 30 minutes:

/usr/bin/pmset -b displaysleep 150

For For 2 minutes:

/usr/bin/pmset -b displaysleep 2

For For 20 minutes:

/usr/bin/pmset -b displaysleep 20

For For 3 hours:

/usr/bin/pmset -b displaysleep 180

For For 3 minutes:

/usr/bin/pmset -b displaysleep 3

For For 30 minutes:

/usr/bin/pmset -b displaysleep 30

For For 5 minutes:

/usr/bin/pmset -b displaysleep 5

For Never:

/usr/bin/pmset -b displaysleep 0

Turn display off on power adapter when inactive

Section titled “Turn display off on power adapter when inactive”

System Settings › Lock Screen › Turn display off on power adapter when inactive

nix-darwin · system-wide ✓ Verified on macOS 27
applications.systemSettings.lockScreen.turnDisplayOffOnPowerAdapterWhenInactive = "For 1 hour";

One of: "For 1 hour""For 1 hour, 30 minutes""For 1 minute""For 10 minutes""For 2 hours""For 2 hours, 30 minutes""For 2 minutes""For 20 minutes""For 3 hours""For 3 minutes""For 30 minutes""For 5 minutes""Never"

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

For For 1 hour:

/usr/bin/pmset -c displaysleep 60

For For 1 hour, 30 minutes:

/usr/bin/pmset -c displaysleep 90

For For 1 minute:

/usr/bin/pmset -c displaysleep 1

For For 10 minutes:

/usr/bin/pmset -c displaysleep 10

For For 2 hours:

/usr/bin/pmset -c displaysleep 120

For For 2 hours, 30 minutes:

/usr/bin/pmset -c displaysleep 150

For For 2 minutes:

/usr/bin/pmset -c displaysleep 2

For For 20 minutes:

/usr/bin/pmset -c displaysleep 20

For For 3 hours:

/usr/bin/pmset -c displaysleep 180

For For 3 minutes:

/usr/bin/pmset -c displaysleep 3

For For 30 minutes:

/usr/bin/pmset -c displaysleep 30

For For 5 minutes:

/usr/bin/pmset -c displaysleep 5

For Never:

/usr/bin/pmset -c displaysleep 0

System Settings › Lock Screen › Show message when locked › Set…

nix-darwin · system-wide ✓ Verified on macOS 27

The message shown on the lock screen and login window. Unset shows none.

applications.systemSettings.lockScreen.messageWhenLocked = "…";

Text "unset" puts back macOS's default.

Where it's stored and what runs
  • /Library/Preferences/com.apple.loginwindow LoginwindowText

For unset:

/usr/bin/defaults delete /Library/Preferences/com.apple.loginwindow LoginwindowText 2>/dev/null || true

For …:

/usr/bin/defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText -string '…' || echo 'nix-plist-manager: failed: /usr/bin/defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText -string '\''…'\''' >&2

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

1 setting
  • Password › Require password to wake computer — the delay is kept in the keybag and changing it needs the user’s password (sysadminctl -screenLock … -password)