-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdarwin.nix
125 lines (100 loc) · 2.81 KB
/
darwin.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
{ pkgs, flake, inputs, ... }: {
imports = [
inputs.home-manager.darwinModules.home-manager
];
nixpkgs = {
config.allowUnfree = true;
hostPlatform = "aarch64-darwin";
};
services.nix-daemon.enable = true;
nix = {
package = pkgs.nix;
settings = {
experimental-features = "nix-command flakes";
trusted-users = ["root" "yuki"];
};
};
programs.zsh.enable = true;
users.users.yuki = {
name = "yuki";
home = "/Users/yuki";
};
home-manager = {
useUserPackages = true;
useGlobalPkgs = true;
extraSpecialArgs = {
system = "aarch64-darwin";
isLinux = false;
isDarwin = true;
};
users.yuki = { ... }: {
imports = [
./home
];
home.stateVersion = "24.05";
};
};
services.tailscale.enable = true;
services.trezord.enable = true;
security.pam.enableSudoTouchIdAuth = true;
system = {
activationScripts.postUserActivation.text = ''
/System/Library/PrivateFrameworks/SystemAdministration.framework/Resources/activateSettings -u
'';
defaults = {
menuExtraClock.Show24Hour = true;
dock = {
autohide = true;
show-recents = false;
orientation = "left";
};
finder = {
_FXShowPosixPathInTitle = false;
AppleShowAllExtensions = true;
FXEnableExtensionChangeWarning = false;
QuitMenuItem = true;
ShowPathbar = true;
ShowStatusBar = false;
CreateDesktop = false;
FXPreferredViewStyle = "clmv";
};
loginwindow = {
GuestEnabled = false;
};
NSGlobalDomain = {
AppleInterfaceStyle = null;
# Control modals with Keyboard
AppleKeyboardUIMode = 3;
# Disable accent input on hold
ApplePressAndHoldEnabled = false;
NSAutomaticCapitalizationEnabled = false;
NSAutomaticDashSubstitutionEnabled = false;
NSAutomaticPeriodSubstitutionEnabled = false;
NSAutomaticQuoteSubstitutionEnabled = false;
NSAutomaticSpellingCorrectionEnabled = false;
NSNavPanelExpandedStateForSaveMode = true;
NSNavPanelExpandedStateForSaveMode2 = true;
};
CustomUserPreferences = {
NSGlobalDomain = {
WebKitDeveloperExtras = true;
};
"com.apple.finder" = {
# Search current folder first
FXDefaultSearchScope = "SCcf";
};
"com.apple.desktopservices" = {
# Avoid creating .DS_Store files on network or USB volumes
DSDontWriteNetworkStores = true;
DSDontWriteUSBStores = true;
};
};
};
keyboard = {
enableKeyMapping = true;
remapCapsLockToEscape = true;
};
};
system.configurationRevision = flake.rev or flake.dirtyRev or null;
system.stateVersion = 4;
}