Files
dotfiles/darwin/default.nix

198 lines
5.4 KiB
Nix
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{ pkgs, config, ... }:
{
homebrew = import ./homebrew-common.nix;
# Auto upgrade nix package and the daemon service.
services.nix-daemon.enable = true;
# Necessary for using flakes on this system.
nix.settings.experimental-features = "nix-command flakes";
nixpkgs.config.allowUnfree = true;
# GnuPG
programs.gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
# Shells
environment.shells = with pkgs; [
bash
zsh
fish
];
environment.extraInit = builtins.readFile ./mac-extra.sh;
programs.zsh.enable = true;
programs.fish.enable = true;
programs.bash.enable = true;
# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
system.stateVersion = 4;
# General UI/UX
system.defaults.NSGlobalDomain = {
# Set Dark Mode
AppleInterfaceStyle = "Dark";
# Set language and text formats
AppleMeasurementUnits = "Centimeters";
ApplePressAndHoldEnabled = false;
# Finder: show all filename extensions
AppleShowAllExtensions = true;
# Set a blazingly fast keyboard repeat rate
KeyRepeat = 2;
InitialKeyRepeat = 15;
# Disable automatic capitalization as its annoying when typing code
NSAutomaticCapitalizationEnabled = false;
# Disable smart dashes as theyre annoying when typing code
NSAutomaticDashSubstitutionEnabled = false;
# Disable automatic period substitution as its annoying when typing code
NSAutomaticPeriodSubstitutionEnabled = false;
# Disable smart quotes as theyre annoying when typing code
NSAutomaticQuoteSubstitutionEnabled = false;
# Disable auto-correct
NSAutomaticSpellingCorrectionEnabled = false;
# Expand save panel by default
NSNavPanelExpandedStateForSaveMode = true;
NSNavPanelExpandedStateForSaveMode2 = true;
# Set sidebar icon size
NSTableViewDefaultSizeMode = 3;
# Expand print panel by default
PMPrintingExpandedStateForPrint = true;
PMPrintingExpandedStateForPrint2 = true;
};
# Disable the “Are you sure you want to open this application?” dialog
system.defaults.LaunchServices.LSQuarantine = false;
# Reduce Motion
system.defaults.universalaccess.reduceMotion = true;
# Finder
system.defaults.finder = {
# Finder: show all filename extensions
AppleShowAllExtensions = true;
# When performing a search, search the current folder by default
FXDefaultSearchScope = "SCcf";
# Disable the warning when changing a file extension
FXEnableExtensionChangeWarning = false;
# Show path breadcrumbs in finder windows.
ShowPathbar = true;
# Show status bar at bottom of finder windows with item/disk space stats.
ShowStatusBar = true;
# Change the default finder view. “icnv” = Icon view, “Nlsv” = List view, “clmv” = Column View, “Flwv” = Gallery View
FXPreferredViewStyle = "clmv";
};
# Magic Mouse
system.defaults.magicmouse.MouseButtonMode = "TwoButton";
# Dock
system.defaults.dock = {
# Automatically hide and show the Dock
autohide = true;
# Remove the auto-hiding Dock delay
autohide-delay = 0.0;
# Remove the animation when hiding/showing the Dock
autohide-time-modifier = 0.0;
# Speed up Mission Control animations
expose-animation-duration = 0.1;
# Dont animate opening applications from the Dock
launchanim = false;
# Change minimize/maximize window effect
mineffect = "scale";
# Minimize windows into their applications icon
minimize-to-application = true;
# Dont automatically rearrange Spaces based on most recent use
mru-spaces = false;
# Hide indicator lights for open applications in the Dock
show-process-indicators = true;
# Dont show recent applications in Dock
show-recents = false;
# Make Dock icons of hidden applications translucent
showhidden = true;
# Set the icon size of Dock items to 36 pixels
tilesize = 36;
# Hot corners
wvous-bl-corner = 4; # bottom left (Desktop)
wvous-br-corner = 10; # bottom right (Put display to sleep)
wvous-tl-corner = 1; # top left (disabled)
wvous-tr-corner = 12; # top right (Mission Control)
# Apps in the Dock
persistent-apps = [
"/Applications/Things3.app"
"/System/Applications/Calendar.app"
"/Applications/WezTerm.app"
"/Applications/Arc.app"
"/Applications/Brave\ Browser.app"
"/System/Applications/Messages.app"
"/Applications/iA\ Writer.app"
"/Applications/Obsidian.app"
"/Applications/DEVONthink\ 3.app"
"/Applications/Eagle.app"
"/Applications/Spotify.app"
"/Applications/Anki.app"
"/Applications/Proton\ Pass.app"
"/System/Applications/System\ Settings.app"
];
};
# Trackpad, mouse, keyboard, Bluetooth accessories, and input
system.defaults.trackpad = {
# Whether to enable trackpad tap to click.
Clicking = true;
# Whether to enable trackpad right click.
TrackpadRightClick = true;
# Whether to enable tap-to-drag.
Dragging = true;
};
# Finder
system.activationScripts.postActivation.text = ''
# Show the ~/Library folder
chflags nohidden ~/Library
# Show the /Volumes folder
sudo chflags nohidden /Volumes
'';
# Additional system configurations
system.defaults.NSGlobalDomain.AppleKeyboardUIMode = 3;
system.defaults.NSGlobalDomain.AppleFontSmoothing = 2;
}