{ config, pkgs, lib, ... }: { fonts.packages = with pkgs; [ iosevka-bin ]; security.pam.enableSudoTouchIdAuth = true; system.activationScripts.postActivation.text = '' # Set the default shell to bash. MacOS doesn't do this like nixOS does sudo chsh -s ${pkgs.bashInteractive}/bin/bash katja ''; system.activationScripts.extraSystemSettings.text = '' # Sleep display after 30 minutes #sudo pmset -a displaysleep 30 # Prevent Time Machine from prompting to use new hard drives as backup volume defaults write com.apple.TimeMachine DoNotOfferNewDisksForBackup -bool true ''; system.activationScripts.extraUserActivation.text = '' # drag windows by holding CTRL + CMD and clicking anywhere in the window # does not work with all applications defaults write -g NSWindowShouldDragOnGesture -bool true chmod 000 ~/Public chmod 000 ~/Movies chmod 000 ~/Desktop chflags hidden ~/Public chflags hidden ~/Movies chflags hidden ~/Desktop ''; time.timeZone = "Europe/Berlin"; system.defaults = { CustomUserPreferences = { # Set accent color to green ".GlobalPreferences".AppleAccentColor = 3; "~/Library/Preferences/ByHost/com.apple.controlcenter.plist" = { # Show battery percentage in menubar BatteryShowPercentage = true; # Show sound-applet always in menubar Sound = 16; }; "com.apple.menuextra.clock" = { # Set menubar clock format DateFormat = "d MMM HH:mm:ss"; # Flash clock time seperators FlashDateSeparators = true; }; # Prevent Photos from opening automatically when devices are plugged in "com.apple.ImageCapture".disableHotPlug = true; # do not autogather large files when submitting a report "com.apple.appleseed.FeedbackAssistant".Autogather = false; # Disable Resume system-wide "com.apple.systempreferences".NSQuitAlwaysKeepsWindows = false; }; NSGlobalDomain = { AppleInterfaceStyle = "Dark"; AppleInterfaceStyleSwitchesAutomatically = false; AppleTemperatureUnit = "Celsius"; AppleMeasurementUnits = "Centimeters"; AppleMetricUnits = 1; AppleShowAllExtensions = true; # Always show scrollbars AppleShowScrollBars = "Always"; # Enable subpixel font rendering on non-Apple LCDs # Reference: https://github.com/kevinSuttle/macOS-Defaults/issues/17#issuecomment-266633501 AppleFontSmoothing = 1; # navigate UI elements with keyboard (tab key) AppleKeyboardUIMode = 3; ApplePressAndHoldEnabled = true; "com.apple.sound.beep.volume" = 0.6; # Set sidebar icon size to medium NSTableViewDefaultSizeMode = 2; # don't animate opening and closing of windows and popovers NSAutomaticWindowAnimationsEnabled = false; NSAutomaticCapitalizationEnabled = false; NSAutomaticDashSubstitutionEnabled = false; NSAutomaticPeriodSubstitutionEnabled = false; NSAutomaticQuoteSubstitutionEnabled = false; NSAutomaticSpellingCorrectionEnabled = false; # Disable automatic termination of inactive apps NSDisableAutomaticTermination = true; }; # disable automatic macupdates SoftwareUpdate.AutomaticallyInstallMacOSUpdates = false; dock = { tilesize = 50; autohide = true; autohide-time-modifier = 0.15; autohide-delay = 0.02; minimize-to-application = true; show-recents = false; # Dont rearrange my workspaces automagicly, thanks mru-spaces = false; # Disable all hot corners wvous-tl-corner = 1; wvous-tr-corner = 1; wvous-bl-corner = 1; wvous-br-corner = 1; }; screencapture = { disable-shadow = true; location = "${config.home-manager.users.katja.home.homeDirectory}/Pictures/Screenshots"; }; smb = { NetBIOSName = config.networking.hostName; ServerDescription = config.networking.hostName; }; }; }