fix: macOS

This commit is contained in:
Ryan Yin
2023-07-17 11:09:06 +08:00
parent b3ac7784ca
commit 0f08976902
4 changed files with 11 additions and 7 deletions

View File

@@ -64,7 +64,7 @@
family: JetBrainsMono Nerd Font
'' + (if pkgs.stdenv.isDarwin then ''
# Point size
size: 14
size: 16
shell: # force nushell as default shell on macOS
program: /run/current-system/sw/bin/nu
'' else ''

View File

@@ -5,7 +5,7 @@
font = {
name = "JetBrainsMono Nerd Font";
# use different font size on macOS
size = if pkgs.stdenv.isDarwin then 14 else 13;
size = if pkgs.stdenv.isDarwin then 16 else 13;
};
settings = {

View File

@@ -53,7 +53,8 @@
# customize macOS
NSGlobalDomain = {
"com.apple.swipescrolldirection" = true; # enable natural scrolling
# `defaults read NSGlobalDomain "xxx"`
"com.apple.swipescrolldirection" = true; # enable natural scrolling(default to true)
"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.
@@ -127,9 +128,11 @@
remapCapsLockToControl = false; # remap caps lock to control, useful for emac users
remapCapsLockToEscape = true; # remap caps lock to escape, useful for vim users
# swap left command and left alt,
# swap left command and left alt
# so it matches common keyboard layout: `ctrl | command | alt`
swapLeftCommandAndLeftAlt = true;
#
# disabled, caused only problems!
swapLeftCommandAndLeftAlt = false;
};
};
@@ -142,6 +145,8 @@
HOMEBREW_PIP_INDEX_URL = "https://pypi.tuna.tsinghua.edu.cn/simple";
};
# homebrew need to be installed manually, see https://brew.sh
homebrew = {
# TODO Homebrew install takes a long time,
# So only enable this when you make changes.

View File

@@ -12,8 +12,7 @@ from pathlib import Path
NIX_DAEMON_PLIST = Path("/Library/LaunchDaemons/org.nixos.nix-daemon.plist")
NIX_DAEMON_NAME = "org.nixos.nix-daemon"
# http proxy provided by clash
# HTTP_PROXY = "http://127.0.0.1:7890"
HTTP_PROXY = "http://192.168.5.201:7890"
HTTP_PROXY = "http://127.0.0.1:7890"
pl = plistlib.loads(NIX_DAEMON_PLIST.read_bytes())