Skip to content

Audio

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

10 options 3 verified against System Settings

System Settings › Accessibility › Audio › Background sounds

home-manager · per user ✓ Verified on macOS 27
applications.systemSettings.accessibility.audio.backgroundSounds = true;

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

Where it's stored and what runs
  • com.apple.ComfortSounds comfortSoundsEnabled

For false:

/usr/bin/defaults write com.apple.ComfortSounds comfortSoundsEnabled -bool false || echo 'nix-plist-manager: failed: /usr/bin/defaults write com.apple.ComfortSounds comfortSoundsEnabled -bool false' >&2
/usr/bin/defaults -currentHost delete com.apple.ComfortSounds comfortSoundsEnabled 2>/dev/null || true

For true:

/usr/bin/defaults write com.apple.ComfortSounds comfortSoundsEnabled -bool true || echo 'nix-plist-manager: failed: /usr/bin/defaults write com.apple.ComfortSounds comfortSoundsEnabled -bool true' >&2
/usr/bin/defaults -currentHost delete com.apple.ComfortSounds comfortSoundsEnabled 2>/dev/null || true

For unset:

/usr/bin/defaults delete com.apple.ComfortSounds comfortSoundsEnabled 2>/dev/null || true
/usr/bin/defaults -currentHost delete com.apple.ComfortSounds comfortSoundsEnabled 2>/dev/null || true

Flash the screen when an alert sound occurs

Section titled “Flash the screen when an alert sound occurs”

System Settings › Accessibility › Audio › Flash the screen when an alert sound occurs

home-manager · per user ✓ Verified on macOS 27
applications.systemSettings.accessibility.audio.flashTheScreenWhenAnAlertSoundOccurs = true;

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

Where it's stored and what runs
  • NSGlobalDomain com.apple.sound.beep.flash
  • com.apple.universalaccess flashScreen

For false:

/usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.flash -int 0 || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.flash -int 0' >&2
/usr/bin/defaults write com.apple.universalaccess flashScreen -bool false || echo 'nix-plist-manager: failed: /usr/bin/defaults write com.apple.universalaccess flashScreen -bool false' >&2
/usr/bin/defaults -currentHost delete NSGlobalDomain com.apple.sound.beep.flash 2>/dev/null || true
/usr/bin/defaults -currentHost delete com.apple.universalaccess flashScreen 2>/dev/null || true

For true:

/usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.flash -int 1 || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.flash -int 1' >&2
/usr/bin/defaults write com.apple.universalaccess flashScreen -bool true || echo 'nix-plist-manager: failed: /usr/bin/defaults write com.apple.universalaccess flashScreen -bool true' >&2
/usr/bin/defaults -currentHost delete NSGlobalDomain com.apple.sound.beep.flash 2>/dev/null || true
/usr/bin/defaults -currentHost delete com.apple.universalaccess flashScreen 2>/dev/null || true

For unset:

/usr/bin/defaults delete NSGlobalDomain com.apple.sound.beep.flash 2>/dev/null || true
/usr/bin/defaults delete com.apple.universalaccess flashScreen 2>/dev/null || true
/usr/bin/defaults -currentHost delete NSGlobalDomain com.apple.sound.beep.flash 2>/dev/null || true
/usr/bin/defaults -currentHost delete com.apple.universalaccess flashScreen 2>/dev/null || true

System Settings › Accessibility › Audio › Play stereo audio as mono

home-manager · per user Not verified
applications.systemSettings.accessibility.audio.playStereoAudioAsMono = true;

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

Where it's stored and what runs
  • com.apple.universalaccess stereoAsMono

For false:

/usr/bin/defaults write com.apple.universalaccess stereoAsMono -bool false || echo 'nix-plist-manager: failed: /usr/bin/defaults write com.apple.universalaccess stereoAsMono -bool false' >&2
/usr/bin/defaults -currentHost delete com.apple.universalaccess stereoAsMono 2>/dev/null || true

For true:

/usr/bin/defaults write com.apple.universalaccess stereoAsMono -bool true || echo 'nix-plist-manager: failed: /usr/bin/defaults write com.apple.universalaccess stereoAsMono -bool true' >&2
/usr/bin/defaults -currentHost delete com.apple.universalaccess stereoAsMono 2>/dev/null || true

For unset:

/usr/bin/defaults delete com.apple.universalaccess stereoAsMono 2>/dev/null || true
/usr/bin/defaults -currentHost delete com.apple.universalaccess stereoAsMono 2>/dev/null || true

Turn off background sounds when your Mac is not in use

Section titled “Turn off background sounds when your Mac is not in use”

System Settings › Accessibility › Audio › Turn off background sounds when your Mac is not in use

home-manager · per user ✓ Verified on macOS 27
applications.systemSettings.accessibility.audio.turnOffBackgroundSoundsWhenYourMacIsNotInUse = true;

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

Where it's stored and what runs
  • com.apple.ComfortSounds stopsOnLock

For false:

/usr/bin/defaults write com.apple.ComfortSounds stopsOnLock -bool false || echo 'nix-plist-manager: failed: /usr/bin/defaults write com.apple.ComfortSounds stopsOnLock -bool false' >&2
/usr/bin/defaults -currentHost delete com.apple.ComfortSounds stopsOnLock 2>/dev/null || true

For true:

/usr/bin/defaults write com.apple.ComfortSounds stopsOnLock -bool true || echo 'nix-plist-manager: failed: /usr/bin/defaults write com.apple.ComfortSounds stopsOnLock -bool true' >&2
/usr/bin/defaults -currentHost delete com.apple.ComfortSounds stopsOnLock 2>/dev/null || true

For unset:

/usr/bin/defaults delete com.apple.ComfortSounds stopsOnLock 2>/dev/null || true
/usr/bin/defaults -currentHost delete com.apple.ComfortSounds stopsOnLock 2>/dev/null || true

System Settings › Accessibility › Audio › Background sounds › Choose…

home-manager · per user Not verified
applications.systemSettings.accessibility.audio.backgroundSound = "/path/to/snapshot";

A directory captured with nix run …#capture — see Snapshots "unset" puts back macOS's default.

Where it's stored and what runs
  • com.apple.ComfortSounds ComfortSoundsSelectedSound

For /path/to/snapshot:

/usr/bin/defaults delete com.apple.ComfortSounds ComfortSoundsSelectedSound 2>/dev/null || true
/usr/bin/defaults import com.apple.ComfortSounds /path/to/snapshot/sound.plist || echo 'nix-plist-manager: failed: /usr/bin/defaults import com.apple.ComfortSounds /path/to/snapshot/sound.plist' >&2
/usr/bin/defaults -currentHost delete com.apple.ComfortSounds ComfortSoundsSelectedSound 2>/dev/null || true

For unset:

/usr/bin/defaults delete com.apple.ComfortSounds ComfortSoundsSelectedSound 2>/dev/null || true
/usr/bin/defaults -currentHost delete com.apple.ComfortSounds ComfortSoundsSelectedSound 2>/dev/null || true

System Settings › Accessibility › Audio › Background sounds › Choose… › Balance

home-manager · per user Not verified
applications.systemSettings.accessibility.audio.backgroundSoundsOptions.balance = -1.0;

A number from -1 to 1 "unset" puts back macOS's default.

Where it's stored and what runs
  • com.apple.ComfortSounds tinnitusBalance

For -1.0:

/usr/bin/defaults write com.apple.ComfortSounds tinnitusBalance -float -1.000000 || echo 'nix-plist-manager: failed: /usr/bin/defaults write com.apple.ComfortSounds tinnitusBalance -float -1.000000' >&2
/usr/bin/defaults -currentHost delete com.apple.ComfortSounds tinnitusBalance 2>/dev/null || true

For 1.0:

/usr/bin/defaults write com.apple.ComfortSounds tinnitusBalance -float 1.000000 || echo 'nix-plist-manager: failed: /usr/bin/defaults write com.apple.ComfortSounds tinnitusBalance -float 1.000000' >&2
/usr/bin/defaults -currentHost delete com.apple.ComfortSounds tinnitusBalance 2>/dev/null || true

For unset:

/usr/bin/defaults delete com.apple.ComfortSounds tinnitusBalance 2>/dev/null || true
/usr/bin/defaults -currentHost delete com.apple.ComfortSounds tinnitusBalance 2>/dev/null || true

System Settings › Accessibility › Audio › Background sounds › Choose… › Equalizer

home-manager · per user Not verified
applications.systemSettings.accessibility.audio.backgroundSoundsOptions.equalizer = true;

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

Where it's stored and what runs
  • com.apple.ComfortSounds tinnitusFilterEnabled

For false:

/usr/bin/defaults write com.apple.ComfortSounds tinnitusFilterEnabled -bool false || echo 'nix-plist-manager: failed: /usr/bin/defaults write com.apple.ComfortSounds tinnitusFilterEnabled -bool false' >&2
/usr/bin/defaults -currentHost delete com.apple.ComfortSounds tinnitusFilterEnabled 2>/dev/null || true

For true:

/usr/bin/defaults write com.apple.ComfortSounds tinnitusFilterEnabled -bool true || echo 'nix-plist-manager: failed: /usr/bin/defaults write com.apple.ComfortSounds tinnitusFilterEnabled -bool true' >&2
/usr/bin/defaults -currentHost delete com.apple.ComfortSounds tinnitusFilterEnabled 2>/dev/null || true

For unset:

/usr/bin/defaults delete com.apple.ComfortSounds tinnitusFilterEnabled 2>/dev/null || true
/usr/bin/defaults -currentHost delete com.apple.ComfortSounds tinnitusFilterEnabled 2>/dev/null || true

System Settings › Accessibility › Audio › Background sounds › Choose… › Set Timer

home-manager · per user Not verified
applications.systemSettings.accessibility.audio.backgroundSoundsOptions.setTimer = "After an amount of time";

One of: "After an amount of time""At a specific time" "unset" puts back macOS's default.

Where it's stored and what runs
  • com.apple.ComfortSounds timerOption

For After an amount of time:

/usr/bin/defaults write com.apple.ComfortSounds timerOption -int 1 || echo 'nix-plist-manager: failed: /usr/bin/defaults write com.apple.ComfortSounds timerOption -int 1' >&2
/usr/bin/defaults -currentHost delete com.apple.ComfortSounds timerOption 2>/dev/null || true

For At a specific time:

/usr/bin/defaults write com.apple.ComfortSounds timerOption -int 0 || echo 'nix-plist-manager: failed: /usr/bin/defaults write com.apple.ComfortSounds timerOption -int 0' >&2
/usr/bin/defaults -currentHost delete com.apple.ComfortSounds timerOption 2>/dev/null || true

For unset:

/usr/bin/defaults delete com.apple.ComfortSounds timerOption 2>/dev/null || true
/usr/bin/defaults -currentHost delete com.apple.ComfortSounds timerOption 2>/dev/null || true

System Settings › Accessibility › Audio › Background sounds › Choose… › Timer

home-manager · per user Not verified
applications.systemSettings.accessibility.audio.backgroundSoundsOptions.timer = true;

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

Where it's stored and what runs
  • com.apple.ComfortSounds timerEnabled

For false:

/usr/bin/defaults write com.apple.ComfortSounds timerEnabled -bool false || echo 'nix-plist-manager: failed: /usr/bin/defaults write com.apple.ComfortSounds timerEnabled -bool false' >&2
/usr/bin/defaults -currentHost delete com.apple.ComfortSounds timerEnabled 2>/dev/null || true

For true:

/usr/bin/defaults write com.apple.ComfortSounds timerEnabled -bool true || echo 'nix-plist-manager: failed: /usr/bin/defaults write com.apple.ComfortSounds timerEnabled -bool true' >&2
/usr/bin/defaults -currentHost delete com.apple.ComfortSounds timerEnabled 2>/dev/null || true

For unset:

/usr/bin/defaults delete com.apple.ComfortSounds timerEnabled 2>/dev/null || true
/usr/bin/defaults -currentHost delete com.apple.ComfortSounds timerEnabled 2>/dev/null || true

System Settings › Accessibility › Audio › Background sounds › Volume

home-manager · per user Not verified
applications.systemSettings.accessibility.audio.backgroundSoundsVolume = 0.0;

A number from 0 to 1 "unset" puts back macOS's default.

Where it's stored and what runs
  • com.apple.ComfortSounds relativeVolume

For 0.0:

/usr/bin/defaults write com.apple.ComfortSounds relativeVolume -float 0.000000 || echo 'nix-plist-manager: failed: /usr/bin/defaults write com.apple.ComfortSounds relativeVolume -float 0.000000' >&2
/usr/bin/defaults -currentHost delete com.apple.ComfortSounds relativeVolume 2>/dev/null || true

For 1.0:

/usr/bin/defaults write com.apple.ComfortSounds relativeVolume -float 1.000000 || echo 'nix-plist-manager: failed: /usr/bin/defaults write com.apple.ComfortSounds relativeVolume -float 1.000000' >&2
/usr/bin/defaults -currentHost delete com.apple.ComfortSounds relativeVolume 2>/dev/null || true

For unset:

/usr/bin/defaults delete com.apple.ComfortSounds relativeVolume 2>/dev/null || true
/usr/bin/defaults -currentHost delete com.apple.ComfortSounds relativeVolume 2>/dev/null || true