Sound
Everything under System Settings › Sound, as Nix options. Each one is named after the control
you'd click, and set under programs.nix-plist-manager.options in home-manager and nix-darwin.
Alert sound
Section titled “Alert sound”System Settings › Sound › Alert sound
applications.systemSettings.sound.soundEffects.alertSound = "Boop"; One of: "Boop""Breeze""Bubble""Crystal""Funky""Heroine""Jump""Mezzo""Pebble""Pluck""Pong""Sonar""Sonumi""Submerge" "unset" puts back macOS's default.
Where it's stored and what runs
-
NSGlobalDomaincom.apple.sound.beep.sound
For Boop:
/usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.sound -string /System/Library/Sounds/Tink.aiff || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.sound -string /System/Library/Sounds/Tink.aiff' >&2/usr/bin/defaults -currentHost delete NSGlobalDomain com.apple.sound.beep.sound 2>/dev/null || trueFor Breeze:
/usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.sound -string /System/Library/Sounds/Blow.aiff || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.sound -string /System/Library/Sounds/Blow.aiff' >&2/usr/bin/defaults -currentHost delete NSGlobalDomain com.apple.sound.beep.sound 2>/dev/null || trueFor Bubble:
/usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.sound -string /System/Library/Sounds/Pop.aiff || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.sound -string /System/Library/Sounds/Pop.aiff' >&2/usr/bin/defaults -currentHost delete NSGlobalDomain com.apple.sound.beep.sound 2>/dev/null || trueFor Crystal:
/usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.sound -string /System/Library/Sounds/Glass.aiff || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.sound -string /System/Library/Sounds/Glass.aiff' >&2/usr/bin/defaults -currentHost delete NSGlobalDomain com.apple.sound.beep.sound 2>/dev/null || trueFor Funky:
/usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.sound -string /System/Library/Sounds/Funk.aiff || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.sound -string /System/Library/Sounds/Funk.aiff' >&2/usr/bin/defaults -currentHost delete NSGlobalDomain com.apple.sound.beep.sound 2>/dev/null || trueFor Heroine:
/usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.sound -string /System/Library/Sounds/Hero.aiff || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.sound -string /System/Library/Sounds/Hero.aiff' >&2/usr/bin/defaults -currentHost delete NSGlobalDomain com.apple.sound.beep.sound 2>/dev/null || trueFor Jump:
/usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.sound -string /System/Library/Sounds/Frog.aiff || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.sound -string /System/Library/Sounds/Frog.aiff' >&2/usr/bin/defaults -currentHost delete NSGlobalDomain com.apple.sound.beep.sound 2>/dev/null || trueFor Mezzo:
/usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.sound -string /System/Library/Sounds/Basso.aiff || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.sound -string /System/Library/Sounds/Basso.aiff' >&2/usr/bin/defaults -currentHost delete NSGlobalDomain com.apple.sound.beep.sound 2>/dev/null || trueFor Pebble:
/usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.sound -string /System/Library/Sounds/Bottle.aiff || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.sound -string /System/Library/Sounds/Bottle.aiff' >&2/usr/bin/defaults -currentHost delete NSGlobalDomain com.apple.sound.beep.sound 2>/dev/null || trueFor Pluck:
/usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.sound -string /System/Library/Sounds/Purr.aiff || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.sound -string /System/Library/Sounds/Purr.aiff' >&2/usr/bin/defaults -currentHost delete NSGlobalDomain com.apple.sound.beep.sound 2>/dev/null || trueFor Pong:
/usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.sound -string /System/Library/Sounds/Morse.aiff || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.sound -string /System/Library/Sounds/Morse.aiff' >&2/usr/bin/defaults -currentHost delete NSGlobalDomain com.apple.sound.beep.sound 2>/dev/null || trueFor Sonar:
/usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.sound -string /System/Library/Sounds/Ping.aiff || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.sound -string /System/Library/Sounds/Ping.aiff' >&2/usr/bin/defaults -currentHost delete NSGlobalDomain com.apple.sound.beep.sound 2>/dev/null || trueFor Sonumi:
/usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.sound -string /System/Library/Sounds/Sosumi.aiff || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.sound -string /System/Library/Sounds/Sosumi.aiff' >&2/usr/bin/defaults -currentHost delete NSGlobalDomain com.apple.sound.beep.sound 2>/dev/null || trueFor Submerge:
/usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.sound -string /System/Library/Sounds/Submarine.aiff || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.sound -string /System/Library/Sounds/Submarine.aiff' >&2/usr/bin/defaults -currentHost delete NSGlobalDomain com.apple.sound.beep.sound 2>/dev/null || trueFor unset:
/usr/bin/defaults delete NSGlobalDomain com.apple.sound.beep.sound 2>/dev/null || true/usr/bin/defaults -currentHost delete NSGlobalDomain com.apple.sound.beep.sound 2>/dev/null || trueAlert volume
Section titled “Alert volume”System Settings › Sound › Alert volume
applications.systemSettings.sound.soundEffects.alertVolume = 0.0; A number from 0 to 1 "unset" puts back macOS's default.
Where it's stored and what runs
-
NSGlobalDomaincom.apple.sound.beep.volume
For 0.0:
/usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.volume -float 0.000000 || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.volume -float 0.000000' >&2/usr/bin/defaults -currentHost delete NSGlobalDomain com.apple.sound.beep.volume 2>/dev/null || trueFor 1.0:
/usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.volume -float 1.000000 || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.volume -float 1.000000' >&2/usr/bin/defaults -currentHost delete NSGlobalDomain com.apple.sound.beep.volume 2>/dev/null || trueFor unset:
/usr/bin/defaults delete NSGlobalDomain com.apple.sound.beep.volume 2>/dev/null || true/usr/bin/defaults -currentHost delete NSGlobalDomain com.apple.sound.beep.volume 2>/dev/null || truePlay feedback when volume is changed
Section titled “Play feedback when volume is changed”System Settings › Sound › Play feedback when volume is changed
applications.systemSettings.sound.soundEffects.playFeedbackWhenVolumeIsChanged = true; true or false "unset" puts back macOS's default.
Where it's stored and what runs
-
NSGlobalDomaincom.apple.sound.beep.feedback
For false:
/usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.feedback -int 0 || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.feedback -int 0' >&2/usr/bin/defaults -currentHost delete NSGlobalDomain com.apple.sound.beep.feedback 2>/dev/null || trueFor true:
/usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.feedback -int 1 || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain com.apple.sound.beep.feedback -int 1' >&2/usr/bin/defaults -currentHost delete NSGlobalDomain com.apple.sound.beep.feedback 2>/dev/null || trueFor unset:
/usr/bin/defaults delete NSGlobalDomain com.apple.sound.beep.feedback 2>/dev/null || true/usr/bin/defaults -currentHost delete NSGlobalDomain com.apple.sound.beep.feedback 2>/dev/null || truePlay sound on startup
Section titled “Play sound on startup”System Settings › Sound › Play sound on startup
applications.systemSettings.sound.soundEffects.playSoundOnStartup = true; true or false
Where it's stored and what runs
For false:
/usr/sbin/nvram StartupMute=%01For true:
/usr/sbin/nvram StartupMute=%00Play user interface sound effects
Section titled “Play user interface sound effects”System Settings › Sound › Play user interface sound effects
applications.systemSettings.sound.soundEffects.playUserInterfaceSoundEffects = true; true or false "unset" puts back macOS's default.
Where it's stored and what runs
-
NSGlobalDomaincom.apple.sound.uiaudio.enabled
For false:
/usr/bin/defaults write NSGlobalDomain com.apple.sound.uiaudio.enabled -int 0 || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain com.apple.sound.uiaudio.enabled -int 0' >&2/usr/bin/defaults -currentHost delete NSGlobalDomain com.apple.sound.uiaudio.enabled 2>/dev/null || trueFor true:
/usr/bin/defaults write NSGlobalDomain com.apple.sound.uiaudio.enabled -int 1 || echo 'nix-plist-manager: failed: /usr/bin/defaults write NSGlobalDomain com.apple.sound.uiaudio.enabled -int 1' >&2/usr/bin/defaults -currentHost delete NSGlobalDomain com.apple.sound.uiaudio.enabled 2>/dev/null || trueFor unset:
/usr/bin/defaults delete NSGlobalDomain com.apple.sound.uiaudio.enabled 2>/dev/null || true/usr/bin/defaults -currentHost delete NSGlobalDomain com.apple.sound.uiaudio.enabled 2>/dev/null || true