-
Notifications
You must be signed in to change notification settings - Fork 3
/
system-common.nix
308 lines (278 loc) · 6.85 KB
/
system-common.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
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
{ lib, pkgs, ... }:
let
patchedExtracturl = pkgs.extract_url.overrideAttrs (old: {
patches = (old.patches or []) ++ [ ./extracturl.patch ];
});
in
{
imports = [
./mods/tailscale.nix
./mods/backlight.nix
./mods/haskell-platform-lite.nix
./mods/dev.nix
./mods/chat.nix
./mods/nitrokey.nix
./mods/xserver.nix
./mods/emacs.nix
];
boot = {
# Use the systemd-boot EFI boot loader.
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = true;
# Don't use tmpOnTmpfs, because I actually use all that ram when compiling
# Haskell
tmp.useTmpfs = false;
tmp.cleanOnBoot = true;
};
documentation.man.generateCaches = true;
# List packages installed in system profile. To search by name, run:
# $ nix-env -qaP | grep wget
environment.systemPackages = with pkgs; [
# categories suck
anki
chrysalis
aspell
# 3d-printing
cura
# personal admin tools
bup
keepassxc
pass
hledger
hledger-ui
# databases
beekeeper-studio # db tool
postgresql
# media
aegisub
audacity
# beets - broken dep python3.7-soco in 20.03
#digikam
blueberry # bluetooth tray and gui
bluetuith # bluetooth tui
docker-credential-helpers
ghostscript
gimp
gitAndTools.git-annex
graphviz
gv
handbrake # Rips DVD to video files
imagemagick
inkscape
pinta # Simple image editor
spotify
transmission
vlc
(callPackage ./terminal-image-viewer {})
zathura # pdf viewer
# linux
(sox.override { enableLame = true; })
bc # More like dc amirite
eplot # Fast command line plotter
fd
file
fzf
gdb
gnumake
htop
jq
jre
lshw
man-pages # OBVIOUSLY
mosh
ncdu
nix-bash-completions
pandoc
par
pciutils # lspci
python3
qdirstat
ripgrep
sqlite-interactive
sshuttle
tmux
tree
unzip
usbutils
yq
# Web
chromium
firefox
w3m
wget
# Email
patchedExtracturl
#lmdb # Header cache for neomutt
#neomutt
#notmuch
#offlineimap
#thunderbird
#vcal
# networking
bind
nethogs
nmap
# Broken on 20.09 with "urwid-2.1.1 not supported for interpreter
# python2.7 :(
# speedometer
tcpdump
# Connect to wifi with a QR. sudo wifi-qr -s
wifi-qr
# devops
awscli
dive
kubectl
kubectx
minikube
metal-cli
freerdp
sops
];
# Set up the default environment
environment.variables = {
EDITOR = "vim";
};
fonts = {
packages = [
pkgs.FSD-Emoji-font
pkgs.pragmataPro-font
pkgs.fira-mono
pkgs.noto-fonts-emoji
pkgs.noto-fonts
pkgs.siji
pkgs.comic-neue
];
fontconfig.defaultFonts = {
monospace = [ "PragmataPro Mono" ];
emoji = [
"FSD Emoji"
];
};
};
hardware = {
bluetooth.enable = true;
cpu.intel.updateMicrocode = true;
pulseaudio.enable = true;
pulseaudio.package = pkgs.pulseaudioFull;
};
i18n.defaultLocale = "en_GB.UTF-8";
location = {
#provider = "geoclue2";
provider = "manual";
# Äkäslompolo
#latitude = 67.6030203;
#longitude = 24.17231;
# Helsinki
#latitude = 60.2443;
#longitude = 24.8800;
# Sintra
#latitude = 38.8017;
#longitude = -9.37979;
# Zürich
latitude = 47.3745;
longitude = 8.5410;
};
networking.networkmanager = {
enable = true;
};
nix = {
gc = {
automatic = true;
dates = "monthly";
# Bumped from 2w to 4w on the 50th of March 2020 because channels were
# moving slowly.
options = "--delete-older-than 30d";
};
settings = {
# Needed for various good things
trusted-users = ["b"];
experimental-features = [ "nix-command" "flakes" ];
};
};
# Sorry, RMS
nixpkgs.config.allowUnfree = true;
nixpkgs.overlays = [
(import ./nonfree-fonts)
];
## Configure programs.
programs = {
atop = {
enable = true;
netatop.enable = true;
atopgpu.enable = true;
};
bash.enableCompletion = true;
gnupg.agent = {
enable = true;
};
ssh.startAgent = true;
};
security.sudo.wheelNeedsPassword = false;
services = {
autorandr.enable = true;
btrfs.autoScrub = {
enable = true;
fileSystems = [ "/" ];
};
dictd = {
enable = true;
DBs = ((d: [
d.wiktionary
d.wordnet
]) pkgs.dictdDBs);
};
fprintd.enable = true;
fwupd.enable = true;
keybase.enable = true;
kbfs.enable = true;
# /run/user/1000 limit
logind.extraConfig = "RuntimeDirectorySize=50%";
printing.enable = true;
# Redshift + Geoclue
redshift = {
enable = true;
brightness.night = "0.97";
temperature = {
day = 6500;
night = 4000;
};
};
syncthing = {
enable = true;
user = "b";
group = "b";
dataDir = "/home/b/Syncthing";
configDir = "/home/b/Syncthing/.config/syncthing";
};
tzupdate.enable = true;
# Packages that include udev rules
udev.packages = [ pkgs.chrysalis ];
};
system = {
autoUpgrade = {
enable = true;
dates = "12:30";
};
};
# Don't need to wait for wired connection, yo
systemd.network.wait-online.anyInterface = true;
# Define a user account. Don't forget to set a password with ‘passwd’.
users.groups.b = {
gid = 1000;
};
users.users.b = {
isNormalUser = true;
uid = 1000;
group = "b";
extraGroups = ["i2c" "users" "wheel" "video" "systemd-journal" "docker" "transmission" "netdev"];
openssh.authorizedKeys.keys = [
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICzNy6bOnkcu54nPeN523uvfRq3WbGCgEbTQifWLF+D0 b@kuusi"
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC5wfyVQYW4sBkZ7a9dNlrGorUXQc1BvHmhxBmmrrwAKs/kkvaS1jgraDvsjo+xo4skiI9HwVXP7OMhjjdLH6MMk3X0Sewv+V8V6xDmpr6NYZKgmFx9b0tPp4IBRsuZu5vbNDyIQo/DbNFzCKT2+ax5DKy/GBahH1WMq4Ks+N01sBrXlOl40fnihdcYTpEZ5jJYheAjrgKpcmoAV364C4lNFfUGxkYVM0DAs39yIahDWQ7bReuzaJRhz+CpfAfNLTpIU1vnWP0yv4ZSRM47eQ59dYVieLqZFxroJ1xXfkdSR10AjCdcmOZWa9Bx9qBF5I5kCdPbW559D6QaROsy4EUzqGOuY8ynALm0zJDXrEj5rTxV8vJfHjQ+m8+oXUdRxdJtbrf0al8mytD80hl50mdzlhomWFiEJO9ny2N4AZiJJ0xbIhAFvHAjaTwTa+j6uF0OFIobcqrtaGjjBYXG8FPdJCNByt7N7g8UOTggfzQoxf3g3dBx79gfBbuKFEohTI7XvgEAvFFVrW3NHn7eYN4QKfqO51ns6atmJDIo0Phpjnz0670I+Od9WETa/IJcNjJkcA22612hhRtNK5NZcgKTRijNStegFAtY7ZApB2nMj5lQcRA3Dps6lF1PpICIj5IBF9R4n5AeR405l9QG113iqvAIezHgYHSltOgHBmGOMw== b@fuzzbomb"
"ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAICXYHLQLP5E9vLzXPaht5rM6T5V7VtFyb48Ep2VCI2Nn bryan@omena"
];
};
virtualisation.docker = {
enable = true;
enableOnBoot = false;
};
}