{ config, lib, pkgs, ... }:

{

  # appearance
  system.defaults.NSGlobalDomain.AppleInterfaceStyle = "Dark";
  system.defaults.NSGlobalDomain.AppleShowScrollBars = "WhenScrolling";
  system.defaults.WindowManager.EnableStandardClickToShowDesktop = true;
  system.startup.chime = true;

  system.defaults.NSGlobalDomain.NSDisableAutomaticTermination = true;
  system.defaults.NSGlobalDomain.NSDocumentSaveNewDocumentsToCloud = false;

  # login
  system.defaults.loginwindow.GuestEnabled = false;
  system.defaults.screensaver.askForPassword = true;

  # control center
  # 18 = show in menubar, 24 = put in control center
  system.defaults.controlcenter = {
    Display = 18;
    FocusModes = 18;
    NowPlaying = 18;
    Sound = 18;

    Bluetooth = 24;
    AirDrop = 24;

    BatteryShowPercentage = true;
  };

  # clock
  system.defaults.menuExtraClock = {
    Show24Hour = false;
    ShowAMPM = true;
    ShowDayOfMonth = true;
    ShowDayOfWeek = true;
  };

  # mission control
  system.defaults.dock.expose-animation-duration = 0.2;

  # spaces
  system.defaults.dock.mru-spaces = false; # dont rearange spaces based on usage
  system.defaults.spaces.spans-displays = true; # displays have different spaces
  system.defaults.NSGlobalDomain.AppleSpacesSwitchOnActivate = true;
}
