mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-04-25 09:28:27 +02:00
fix: macOS
This commit is contained in:
@@ -64,7 +64,7 @@
|
|||||||
family: JetBrainsMono Nerd Font
|
family: JetBrainsMono Nerd Font
|
||||||
'' + (if pkgs.stdenv.isDarwin then ''
|
'' + (if pkgs.stdenv.isDarwin then ''
|
||||||
# Point size
|
# Point size
|
||||||
size: 14
|
size: 16
|
||||||
shell: # force nushell as default shell on macOS
|
shell: # force nushell as default shell on macOS
|
||||||
program: /run/current-system/sw/bin/nu
|
program: /run/current-system/sw/bin/nu
|
||||||
'' else ''
|
'' else ''
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
font = {
|
font = {
|
||||||
name = "JetBrainsMono Nerd Font";
|
name = "JetBrainsMono Nerd Font";
|
||||||
# use different font size on macOS
|
# 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 = {
|
settings = {
|
||||||
|
|||||||
@@ -53,7 +53,8 @@
|
|||||||
|
|
||||||
# customize macOS
|
# customize macOS
|
||||||
NSGlobalDomain = {
|
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
|
"com.apple.sound.beep.feedback" = 0; # disable beep sound when pressing volume up/down key
|
||||||
AppleInterfaceStyle = "Dark"; # dark mode
|
AppleInterfaceStyle = "Dark"; # dark mode
|
||||||
AppleKeyboardUIMode = 3; # Mode 3 enables full keyboard control.
|
AppleKeyboardUIMode = 3; # Mode 3 enables full keyboard control.
|
||||||
@@ -127,9 +128,11 @@
|
|||||||
remapCapsLockToControl = false; # remap caps lock to control, useful for emac users
|
remapCapsLockToControl = false; # remap caps lock to control, useful for emac users
|
||||||
remapCapsLockToEscape = true; # remap caps lock to escape, useful for vim 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`
|
# 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_PIP_INDEX_URL = "https://pypi.tuna.tsinghua.edu.cn/simple";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
# homebrew need to be installed manually, see https://brew.sh
|
||||||
homebrew = {
|
homebrew = {
|
||||||
# TODO Homebrew install takes a long time,
|
# TODO Homebrew install takes a long time,
|
||||||
# So only enable this when you make changes.
|
# So only enable this when you make changes.
|
||||||
|
|||||||
@@ -12,8 +12,7 @@ from pathlib import Path
|
|||||||
NIX_DAEMON_PLIST = Path("/Library/LaunchDaemons/org.nixos.nix-daemon.plist")
|
NIX_DAEMON_PLIST = Path("/Library/LaunchDaemons/org.nixos.nix-daemon.plist")
|
||||||
NIX_DAEMON_NAME = "org.nixos.nix-daemon"
|
NIX_DAEMON_NAME = "org.nixos.nix-daemon"
|
||||||
# http proxy provided by clash
|
# http proxy provided by clash
|
||||||
# HTTP_PROXY = "http://127.0.0.1:7890"
|
HTTP_PROXY = "http://127.0.0.1:7890"
|
||||||
HTTP_PROXY = "http://192.168.5.201:7890"
|
|
||||||
|
|
||||||
pl = plistlib.loads(NIX_DAEMON_PLIST.read_bytes())
|
pl = plistlib.loads(NIX_DAEMON_PLIST.read_bytes())
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user