-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathsys.nix
216 lines (189 loc) · 4.58 KB
/
sys.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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
{
inputs,
pkgs,
lib,
...
}: {
security.pam.enableSudoTouchIdAuth = true;
services = {
nix-daemon.enable = true;
skhd = {
enable = true;
package = pkgs.skhd;
skhdConfig = ''
alt - return : wezterm
alt - w : open -na "Arc"
'';
};
};
networking = {
computerName = "MacBook Air";
hostName = "canis";
};
environment.variables.FLAKE = "/Users/marshall/nix-config";
fonts = {
fontDir.enable = true;
fonts = with pkgs; [
font-awesome
inter
maple-mono
monocraft
nerdfonts
victor-mono
];
};
nix = {
gc = {
automatic = true;
interval.Day = 7;
};
daemonIOLowPriority = true;
daemonProcessType = "Adaptive";
distributedBuilds = true;
nixPath = ["nixpkgs=${inputs.nixpkgs}"];
registry = lib.mapAttrs (_: v: {flake = v;}) inputs;
settings = {
auto-optimise-store = true;
builders-use-substitutes = true;
extra-experimental-features = "nix-command flakes";
flake-registry = "/etc/nix/registry.json";
keep-derivations = true;
keep-outputs = true;
max-jobs = "auto";
warn-dirty = false;
extra-sandbox-paths = ["/nix/var/cache/ccache"];
substituters = [
"https://cache.nixos.org"
"https://nix-community.cachix.org"
];
trusted-substituters = [
"cache.nixos.org"
"nix-community.cachix.org"
];
trusted-public-keys = [
"cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ="
];
trusted-users = ["marshall"];
};
};
home-manager = {
extraSpecialArgs = {inherit inputs;};
useGlobalPkgs = true;
backupFileExtension = "bak";
users.marshall = {...}: {imports = [./home.nix];};
};
homebrew = {
enable = false;
onActivation = {
cleanup = "none";
upgrade = true;
autoUpdate = true;
};
brews = [
{
name = "felixkratz/formulae/fyabai";
args = ["HEAD"];
}
"jj"
"libiconv"
"pinentry-mac"
"rustup-init"
];
casks = [
"balenaetcher"
"beaver-notes-arm"
"datweatherdoe"
"devtoys"
"doll"
"gpg-suite"
"jetbrains-toolbox" # Imperative IDE installs because of github copilot
"launchcontrol"
"ngrok"
"qlcolorcode"
"qlimagesize"
"qlmarkdown"
"qlstephen"
"qlvideo"
"quicklook-csv"
"quicklook-json"
"quicklookase"
"sf-symbols"
"slimhud"
"spaceid"
"suspicious-package"
"telegram"
"ubersicht"
"unnaturalscrollwheels"
"utm-beta"
"zerotier-one"
];
taps = [
"DamascenoRafael/tap"
"Daniele-rolli/homebrew-beaver"
"FelixKratz/formulae"
"homebrew/cask-drivers"
"homebrew/cask-versions"
"homebrew/services"
];
};
programs = {
nix-index.enable = true;
gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
};
nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [
(_self: super: {
ccacheWrapper = super.ccacheWrapper.override {
extraConfig = ''
export CCACHE_COMPRESS=1
export CCACHE_DIR="/nix/var/cache/ccache"
export CCACHE_UMASK=007
if [ ! -d "$CCACHE_DIR" ]; then
echo "====="
echo "Directory '$CCACHE_DIR' does not exist"
echo "Please create it with:"
echo " sudo mkdir -m0770 '$CCACHE_DIR'"
echo " sudo chown root:nixbld '$CCACHE_DIR'"
echo "====="
exit 1
fi
if [ ! -w "$CCACHE_DIR" ]; then
echo "====="
echo "Directory '$CCACHE_DIR' is not accessible for user $(whoami)"
echo "Please verify its access permissions"
echo "====="
exit 1
fi
'';
};
})
];
system = {
keyboard.enableKeyMapping = true;
defaults = {
NSGlobalDomain = {
KeyRepeat = 1;
NSAutomaticCapitalizationEnabled = false;
NSAutomaticSpellingCorrectionEnabled = false;
};
dock = {
autohide = true;
autohide-delay = 1000.0;
expose-animation-duration = 0.0;
orientation = "bottom";
showhidden = true;
tilesize = 48;
};
};
};
users.users.marshall = {
name = "marshall";
home = "/Users/marshall";
};
documentation.enable = false;
}