mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-07-09 14:15:12 +02:00
fix: customize macOS, fix alacritty
This commit is contained in:
@@ -278,7 +278,7 @@ shell:
|
|||||||
#
|
#
|
||||||
# Directory the shell is started in. If this is unset, or `None`, the working
|
# Directory the shell is started in. If this is unset, or `None`, the working
|
||||||
# directory of the parent process will be used.
|
# directory of the parent process will be used.
|
||||||
working_directory: ~/codes/
|
#working_directory: None
|
||||||
|
|
||||||
# Offer IPC using `alacritty msg` (unix only)
|
# Offer IPC using `alacritty msg` (unix only)
|
||||||
#ipc_socket: true
|
#ipc_socket: true
|
||||||
|
|||||||
@@ -278,7 +278,7 @@ live_config_reload: true
|
|||||||
#
|
#
|
||||||
# Directory the shell is started in. If this is unset, or `None`, the working
|
# Directory the shell is started in. If this is unset, or `None`, the working
|
||||||
# directory of the parent process will be used.
|
# directory of the parent process will be used.
|
||||||
working_directory: ~/codes/
|
#working_directory: None
|
||||||
|
|
||||||
# Offer IPC using `alacritty msg` (unix only)
|
# Offer IPC using `alacritty msg` (unix only)
|
||||||
#ipc_socket: true
|
#ipc_socket: true
|
||||||
|
|||||||
+70
-20
@@ -11,18 +11,60 @@
|
|||||||
|
|
||||||
system = {
|
system = {
|
||||||
defaults = {
|
defaults = {
|
||||||
|
# customize dock
|
||||||
dock = {
|
dock = {
|
||||||
autohide = true;
|
autohide = true;
|
||||||
|
show-recents = false; # disable recent apps
|
||||||
|
|
||||||
|
# customize Hot Corners(触发角, 鼠标移动到屏幕角落时触发的动作)
|
||||||
|
wvous-tl-corner = 2; # Mission Control
|
||||||
|
wvous-tr-corner = 13; # Lock Screen
|
||||||
|
wvous-bl-corner = 3; # Application Windows
|
||||||
|
wvous-br-corner = 4; # Desktop
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# customize finder
|
||||||
finder = {
|
finder = {
|
||||||
_FXShowPosixPathInTitle = false;
|
_FXShowPosixPathInTitle = true; # show full path in finder title
|
||||||
|
AppleShowAllExtensions = true; # show all file extensions
|
||||||
|
FXEnableExtensionChangeWarning = false; # disable warning when changing file extension
|
||||||
|
QuitMenuItem = true; # enable quit menu item
|
||||||
|
ShowPathbar = true; # show path bar
|
||||||
|
ShowStatusBar = true; # show status bar
|
||||||
|
};
|
||||||
|
|
||||||
|
# customize trackpad
|
||||||
|
trackpad = {
|
||||||
|
Clicking = true; # enable tap to click
|
||||||
|
Dragging = true; # enable tap to drag
|
||||||
|
TrackpadRightClick = true; # enable two finger right click
|
||||||
|
TrackpadThreeFingerDrag = true; # enable three finger drag
|
||||||
|
};
|
||||||
|
|
||||||
|
# customize macOS
|
||||||
|
NSGlobalDomain = {
|
||||||
|
"com.apple.swipescrolldirection" = true; # enable natural scrolling
|
||||||
|
"com.apple.sound.beep.feedback" = 0; # disable beep sound when pressing volume up/down key
|
||||||
|
AppleInterfaceStyle = "Dark"; # dark mode
|
||||||
|
AppleKeyboardUIMode = 3; # Mode 3 enables full keyboard control.
|
||||||
|
ApplePressAndHoldEnabled = true; # enable press and hold
|
||||||
|
NSAutomaticCapitalizationEnabled = false; # disable auto capitalization(自动大写)
|
||||||
|
NSAutomaticDashSubstitutionEnabled = false; # disable auto dash substitution(智能破折号替换)
|
||||||
|
NSAutomaticPeriodSubstitutionEnabled = false; # disable auto period substitution(智能句号替换)
|
||||||
|
NSAutomaticQuoteSubstitutionEnabled = false; # disable auto quote substitution(智能引号替换)
|
||||||
|
NSAutomaticSpellingCorrectionEnabled = false; # disable auto spelling correction(自动拼写检查)
|
||||||
|
NSNavPanelExpandedStateForSaveMode = true; # expand save panel by default(保存文件时的路径选择/文件名输入页)
|
||||||
|
NSNavPanelExpandedStateForSaveMode2 = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# keyboard settings is not very useful on macOS
|
||||||
|
# the most important thing is to remap option key to alt key globally,
|
||||||
|
# but it's not supported by macOS yet.
|
||||||
keyboard = {
|
keyboard = {
|
||||||
enableKeyMapping = true;
|
enableKeyMapping = true; # enable key mapping so that we can use `option` as `control`
|
||||||
remapCapsLockToControl = true;
|
remapCapsLockToControl = false; # remap caps lock to control
|
||||||
|
remapCapsLockToEscape = false; # remap caps lock to escape
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -35,6 +77,11 @@
|
|||||||
cleanup = "zap";
|
cleanup = "zap";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# Applications to install from Mac App Store using mas.
|
||||||
|
masApps = {
|
||||||
|
# Xcode = 497799835;
|
||||||
|
};
|
||||||
|
|
||||||
taps = [
|
taps = [
|
||||||
"homebrew/cask"
|
"homebrew/cask"
|
||||||
"homebrew/cask-fonts"
|
"homebrew/cask-fonts"
|
||||||
@@ -47,21 +94,23 @@
|
|||||||
|
|
||||||
brews = [
|
brews = [
|
||||||
# `brew install`
|
# `brew install`
|
||||||
"wget"
|
"wget" # download tool
|
||||||
"curl" # no not install curl via nixpkgs, it's not working well on macOS!
|
"curl" # no not install curl via nixpkgs, it's not working well on macOS!
|
||||||
"aria2"
|
"aria2" # download tool
|
||||||
"httpie"
|
"httpie" # http client
|
||||||
"wireguard-tools"
|
"wireguard-tools" # wireguard
|
||||||
"tailscale"
|
"tailscale" # tailscale
|
||||||
];
|
];
|
||||||
|
|
||||||
# `brew install --cask`
|
# `brew install --cask`
|
||||||
casks = [
|
casks = [
|
||||||
|
# broser & editor
|
||||||
"firefox"
|
"firefox"
|
||||||
"google-chrome"
|
"google-chrome"
|
||||||
"visual-studio-code"
|
"visual-studio-code"
|
||||||
"visual-studio-code-insiders"
|
"visual-studio-code-insiders"
|
||||||
|
|
||||||
|
# IM & audio & remote desktop & meeting
|
||||||
"telegram"
|
"telegram"
|
||||||
"discord"
|
"discord"
|
||||||
"wechat"
|
"wechat"
|
||||||
@@ -73,20 +122,21 @@
|
|||||||
"tencent-meeting"
|
"tencent-meeting"
|
||||||
|
|
||||||
# "anki"
|
# "anki"
|
||||||
"clashx"
|
"clashx" # proxy tool
|
||||||
"iina"
|
"iina" # video player
|
||||||
"openinterminal-lite"
|
"openinterminal-lite" # open current folder in terminal
|
||||||
"syncthing"
|
"syncthing" # file sync
|
||||||
"raycast"
|
"raycast" # Alfred-like tool(search and run scripts)
|
||||||
"iglance"
|
"iglance" # beautiful system monitor
|
||||||
"eudic"
|
"eudic" # 欧路词典
|
||||||
"baiduinput" # baidu input method
|
"baiduinput" # baidu input method
|
||||||
# "reaper"
|
# "reaper" # audio editor
|
||||||
|
|
||||||
"insomnia"
|
# Development
|
||||||
"wireshark"
|
"insomnia" # REST client
|
||||||
"jdk-mission-control"
|
"wireshark" # network analyzer
|
||||||
"google-cloud-sdk"
|
"jdk-mission-control" # Java Mission Control
|
||||||
|
"google-cloud-sdk" # Google Cloud SDK
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
+13
-1
@@ -10,7 +10,8 @@
|
|||||||
#
|
#
|
||||||
###################################################################################
|
###################################################################################
|
||||||
|
|
||||||
# # enable flakes globally
|
|
||||||
|
# enable flakes globally
|
||||||
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
nix.settings.experimental-features = [ "nix-command" "flakes" ];
|
||||||
|
|
||||||
nix.settings.trusted-users = ["admin"];
|
nix.settings.trusted-users = ["admin"];
|
||||||
@@ -28,6 +29,17 @@
|
|||||||
|
|
||||||
programs.nix-index.enable = true;
|
programs.nix-index.enable = true;
|
||||||
|
|
||||||
|
# boot.loader.grub.configurationLimit = 10;
|
||||||
|
# do garbage collection weekly to keep disk usage low
|
||||||
|
nix.gc = {
|
||||||
|
automatic = lib.mkDefault true;
|
||||||
|
options = lib.mkDefault "--delete-older-than 1w";
|
||||||
|
};
|
||||||
|
|
||||||
|
# Manual optimise storage: nix-store --optimise
|
||||||
|
# https://nixos.org/manual/nix/stable/command-ref/conf-file.html#conf-auto-optimise-store
|
||||||
|
nix.settings.auto-optimise-store = true;
|
||||||
|
|
||||||
# Add ability to used TouchID for sudo authentication
|
# Add ability to used TouchID for sudo authentication
|
||||||
security.pam.enableSudoTouchIdAuth = true;
|
security.pam.enableSudoTouchIdAuth = true;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user