-
Notifications
You must be signed in to change notification settings - Fork 0
/
darwin-configuration.nix
122 lines (108 loc) · 2.87 KB
/
darwin-configuration.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
{ pkgs, ... }:
{
# Auto upgrade nix package and the daemon service.
services = {
nix-daemon = {
enable = true;
};
};
nix = {
package = pkgs.nix;
settings = {
"extra-experimental-features" = [ "nix-command" "flakes" ];
};
};
nixpkgs = {
config = {
allowUnfree = true; # VSCode, ...
};
};
programs = {
zsh = {
# Create /etc/zshrc that loads the nix-darwin environment.
# Very important. Only once this is activated do you get a shell with everything set up.
enable = true;
};
bash = {
# Some tools might have `/bin/bash` hard-coded, so help get Nix into those.
enable = true;
};
};
fonts = {
packages = [
(pkgs.nerdfonts.override {
fonts = [
"FiraCode"
];
})
];
};
homebrew = {
enable = true;
onActivation = {
cleanup = "zap";
};
taps = [
# Gives `Error: Refusing to untap homebrew/cask because it contains the following
# installed formulae or casks: ...` with `cleanup = "zap"` if this isn't present.
"homebrew/cask"
];
casks = [
"calibre"
"db-browser-for-sqlite"
"dbeaver-community"
"discord"
"docker"
"firefox"
"google-chrome"
"joplin"
"linearmouse"
"nextcloud"
"raycast"
"signal"
"spotify"
"vlc"
"zotero"
];
masApps = {
# These are all special snowflakes, and installation might fail here for various
# reasons which can only be resolved in the App Store GUI. It's still convenient
# to have them listed here for reference, and guaranteeing their installation.
"Wireguard" = 1451685025;
"Telegram" = 747648890;
};
};
system = {
# Used for backwards compatibility, please read the changelog before changing.
# $ darwin-rebuild changelog
stateVersion = 4;
activationScripts = {
postUserActivation = {
# https://medium.com/@zmre/nix-darwin-quick-tip-activate-your-preferences-f69942a93236
text = "/System/Library/PrivateFrameworks/SystemAdministration.framework/Resources/activateSettings - u";
};
};
defaults = {
dock = {
autohide = true;
orientation = "left";
show-process-indicators = false;
show-recents = false;
static-only = true;
};
finder = {
AppleShowAllExtensions = true;
AppleShowAllFiles = true;
FXEnableExtensionChangeWarning = false;
ShowPathbar = true;
ShowStatusBar = true;
_FXShowPosixPathInTitle = true;
};
NSGlobalDomain = {
AppleFontSmoothing = 0; # https://www.reddit.com/r/apple/comments/t9qdl1/comment/hzvyq2g/
InitialKeyRepeat = 15; # Delay before keys are repeated
KeyRepeat = 2; # Delay between repeated keystrokes when holding down
};
};
};
}