How I like my macOS

last modified on

contents…

System Preferences

Misc stuff

No .DS_Store files on remote devices

$ defaults write com.apple.desktopservices DSDontWriteUSBStores -bool true
$ defaults write com.apple.desktopservices DSDontWriteNetworkStores -bool true

Nix

  1. Install Nix.
  2. Add /nix/var/nix/profiles/default/bin to $PATH in ~/.profile.
  3. Add experimental-features = nix-command flakes to ~/.config/nix/nix.conf.
  4. Bootstrap minimal flake.nix for home-manager.
  5. Add ~/.nix-profile/bin to $PATH in ~/.profile.

To use the Yubikey for Git over SSH:

$ nix shell nixpkgs#git nixpkgs#gnupg nixpkgs#home-manager
$ gpg --card-status
$ export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket)
$ git clone ...
$ home-manager switch --flake .

If the profile-creation bug is still there:

$ mkdir -p ~/.local/state/nix/profiles
$ ln -sfn ~/.local/state/nix/profiles/profile ~/.nix-profile

Misc / other

Disable Spotlight for a directory or volume

$ touch /path/to/directory/.metadata_never_index

How to print double-sided / duplex

  1. In the print dialog, click Show Details, then Paper Handling.
  2. Set the Pages to Print to Odds Only.
  3. Print.
  4. Take the paper direct from the out-tray to the in-tray.
  5. In the print dialog, click Show Details, then Paper Handling.
  6. Set the Pages to Print to Odds Only.
  7. Set the Page Order to Reverse.
  8. Print.

Custom sound effects

  1. Move e.g. Honk.aiff to /Library/Audio/Sounds/Alerts/.
  2. Open System Preferences > Sound > Sound Effects.
  3. Select “Honk”.