-
Notifications
You must be signed in to change notification settings - Fork 3
/
configuration.nix
437 lines (397 loc) · 10.1 KB
/
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
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
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
# Edit this configuration file to define what should be installed on
# your system. Help is available in the configuration.nix(5) man page
# and in the NixOS manual (accessible by running ‘nixos-help’).
{ config, pkgs, options, ... }:
{
imports =
[ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# Without any `nix.nixPath` entry:
# nix.nixPath =
# # Prepend default nixPath values.
# options.nix.nixPath.default ++
# # Append our nixpkgs-overlays.
# [ "nixpkgs-overlays=/etc/nixos/overlays-compat/" ];
system.stateVersion = "22.05";
nix.settings.experimental-features = [ "nix-command" "flakes" ];
boot.tmp.cleanOnBoot = true;
boot.initrd.checkJournalingFS = false;
boot.kernelPackages = pkgs.linuxPackages_latest;
boot.kernelParams = [ "ipv6.disable=0" "intel_pstate=enable" ];
# boot.kernelParams = [ "ipv6.disable=0" "intel_pstate=no_hwp" ]; # intel_cpufreq
# boot.kernelParams = [ "ipv6.disable=0" "intel_pstate=disable" ]; # acpi-cpufreq
boot.kernel.sysctl = { "vm.max_map_count" = 262144; };
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
hardware.bluetooth.enable = true;
hardware.enableAllFirmware = true;
hardware.enableRedistributableFirmware = false;
hardware.pulseaudio.enable = true;
powerManagement.enable = true;
networking.hostName = "carbon"; # Define your hostname.
networking.extraHosts = ''
127.0.0.1 carbon
127.0.0.1 local.threatx.io
192.168.0.101 raspberrypi
''; # Define your hostname.
networking.networkmanager.enable = true;
networking.firewall.enable = false;
time.timeZone = "America/Denver";
environment.pathsToLink = [ ];
# List packages installed in system profile. To search by name, run:
environment.systemPackages = with pkgs; [
ack
acpica-tools
# android-studio
unstable.alacritty
ark
autoconf
autorandr
# unstable.amazon-ecs-cli
awscli2
azure-cli
bat
bazel
bind
binutils-unwrapped
birdtray # thunderbird tray support
unstable.bitwarden
unstable.bitwarden-cli
bluedevil
bluez
chromium
cacert
clang
cmake
colordiff
cpufrequtils
unstable.cudaPackages.libcublas
unstable.cudaPackages.libcufft
csvkit
# unstable.discord
distrobox
dive
dmidecode
# docker
docker-compose
dpkg
dtrx
emacs-nox
efivar
ethtool
exfat
ffmpeg
ffmpegthumbs
file
firefox
firejail
fzf
gcc
gdal
gdb
gimp
git
gnomeExtensions.dash-to-panel
gnumake
gnupg
gnutls
go
(unstable.google-cloud-sdk.withExtraComponents [google-cloud-sdk.components.cloud-run-proxy google-cloud-sdk.components.beta google-cloud-sdk.components.log-streaming])
gparted
graphviz
hdparm
unstable.heroku
hfsprogs
htop
httperf
httrack
i7z
icdiff
icu
unstable.jetbrains.idea-ultimate
inetutils
iotop
iperf
# ipfs
iptables
jdk8
jq
jupyter
# kbfs #keybase fs
kcalc
# keybase-gui
kompare
# kruler
konversation
kscreen
ktorrent
kubectl
lastpass-cli
libcanberra_kde
cudaPackages.libcufft
libmtp
libogg
libxml2
linuxPackages.cpupower
lm_sensors
lshw
lsof
minikube
minio-client
mplayer
multitail
nethogs
nginx
mtpfs
ncdu
ngrok
niv
nix-diff
nix-index
#nodejs
# unstable.nox
numactl
okular
openvpn
openssl
p7zip
parted
patchelf
pavucontrol
pciutils
peek
pinentry
pkgconfig
plasma-browser-integration
pmutils
unstable.poetry
powertop
psmisc
jetbrains.pycharm-professional
python311
# python311Packages.jupyter-core
python310Packages.ipykernel
rdiff-backup
rpm
ruby
unstable.rustup
unstable.jetbrains.rust-rover
(unstable.sbt.override { jre = pkgs.jdk8; })
scala
unstable.slack
smem
snappy
socat
spectacle
sqlite
stress
sudo
sysfsutils
sysstat
terminator
tig
unstable.thermald
thinkfan
thunderbird
tmux
tree
unrar
unzip
usbutils
v4l_utils
vim
virt-manager
visualvm
vlc
unstable.vscode
wget
wmctrl
which
xclip
xdotool
xorg.xhost
xorg.xbacklight
xsel
yarn
zile
zip
zlib
zsh
unstable.zoom-us
];
# List services that you want to enable:
services = {
acpid.enable = true;
dnsmasq.enable = false;
openssh.enable = true;
upower.enable = true;
thermald.enable = false;
thinkfan.enable = false;
timesyncd.enable = true;
tlp.enable = false;
# tlp.extraConfig = ''
# DISK_DEVICES="nvme0n1p3"
# '';
printing.enable = true;
logind.extraConfig = "HandleLidSwitch=ignore\nHandleSuspendKey=ignore\nHandleHibernateKey=ignore\nLidSwitchIgnoreInhibited=no";
flatpak.enable = true;
fwupd.enable = true;
keybase.enable = false;
kbfs.enable = false;
postgresql = {
enable = false;
package = pkgs.postgresql_11;
# extraPlugins = [ pkgs.postgis ];
};
mysql = {
enable = false;
package = pkgs.mariadb;
};
kibana = {
enable = false;
package = pkgs.kibana7;
};
elasticsearch = {
enable = false;
package = pkgs.elasticsearch7;
extraConf = ''
http.max_content_length: 200mb
path.repo: ["/home/elasticsearch/backups"]
script.painless.regex.enabled: true
xpack.ml.enabled: false
'';
extraJavaOptions = [];
};
minio = {
enable = false;
listenAddress = ":9090";
accessKey = "1be2d348-c1d1-4063-9e22-291ccb282712";
secretKey = "47cb89be-e7dc-44ff-b240-04e00fc79acd";
};
mongodb.enable = false;
# Enable the X11 windowing system.
xserver = {
enable = true;
layout = "us";
# Enable the KDE Desktop Environment.
displayManager.sddm.enable = true;
# Only setting needed for kde5
desktopManager.plasma5.enable = true;
desktopManager.gnome.enable = false;
libinput.enable = true;
libinput.touchpad.tapping = false;
libinput.touchpad.clickMethod = "clickfinger";
libinput.touchpad.horizontalScrolling = false;
monitorSection = ''
Modeline "2560x1600" 348.50 2560 2760 3032 3504 1600 1603 1609 1658 -hsync +vsync
Modeline "1920x1200" 193.25 1920 2056 2256 2592 1200 1203 1209 1245 -hsync +vsync
Modeline "1680x1050" 146.25 1680 1784 1960 2240 1050 1053 1059 1089 -hsync +vsync
Modeline "1440x810" 95.00 1440 1520 1664 1888 810 813 818 841 -hsync +vsync
Modeline "1792x1008" 149.50 1792 1904 2088 2384 1008 1011 1016 1046 -hsync +vsync
Modeline "1664x936" 128.50 1664 1768 1936 2208 936 939 944 972 -hsync +vsync
Modeline "1536x864" 109.25 1536 1624 1784 2032 864 867 872 897 -hsync +vsync
'';
deviceSection = ''
Option "ModeValidation" "AllowNonEdidModes"
'';
inputClassSections = [
];
resolutions = [ { x = 1536; y = 864; } ];
config = ''
Section "Monitor"
Modeline "3200x1800" 492.00 3200 3456 3800 4400 1800 1803 1808 1865 -hsync +vsync
# Option "PreferredMode" "1280x800"
Identifier "DP1"
EndSection
'';
};
};
virtualisation.docker.enable = true;
virtualisation.libvirtd.enable = true;
virtualisation.virtualbox.host.enable = true;
users.extraGroups.vboxusers.members = [ "user-with-access-to-virtualbox" ];
virtualisation.lxd.enable = true;
virtualisation.lxc.lxcfs.enable = true;
virtualisation.waydroid.enable = false;
# users.extraGroups = { adbusers = { }; };
# Define a user account. Don't forget to set a password with ‘passwd’.
users.extraUsers.jsimpson = {
isNormalUser = true;
uid = 1000;
home = "/home/jsimpson";
createHome = true;
extraGroups = [ "wheel" "networkmanager" "docker" "audio" "adbusers" "dialout" "vboxusers" "docker" "kvm" "libvirtd" "lxd" ];
shell = "/run/current-system/sw/bin/fish";
};
nixpkgs.config = {
allowBroken = true;
allowUnfree = true;
oraclejdk.accept_license = true;
permittedInsecurePackages = [
"libplist-1.12"
"nodejs-16.20.2"
"qtwebkit-5.212.0-alpha4"
"python-2.7.18.6"
];
# virtualbox.enableExtensionPack = true;
packageOverrides = pkgs: rec {
unstable = import <unstable> {
# pass the nixpkgs config to the unstable alias
# to ensure `allowUnfree = true;` is propagated:
config = config.nixpkgs.config;
};
# See overlays below for overrides...
};
};
nixpkgs.overlays = [
# (let
# pinnedPkgs = import(pkgs.fetchFromGitHub {
# owner = "NixOS";
# repo = "nixpkgs";
# rev = "b6bbc53029a31f788ffed9ea2d459f0bb0f0fbfc";
# sha256 = "sha256-JVFoTY3rs1uDHbh0llRb1BcTNx26fGSLSiPmjojT+KY=";
# }) {};
# in
# final: prev: {
# docker = pinnedPkgs.docker;
# })
# (self: super:
# {
# jetbrains.idea-ultimate = super.jetbrains.idea-ultimate.overrideAttrs (attrs: rec {
# src = super.fetchurl {
# url = "https://download.jetbrains.com/idea/ideaIU-2021.2.4.tar.gz";
# sha256 = "sha256:07ldxhlfkpdvysp00a9d7l75xlqpnf0r6d0dpwzb8wh3iyhf1jq4";
# };
# });
# }
# )
#(import /etc/nixos/overlays-compat/idea.nix)
];
programs.zsh.enable = false;
programs.fish.enable = true;
programs.adb.enable = true;
programs.gnupg.agent.enable = true;
security.sudo.wheelNeedsPassword = false;
security.polkit.extraConfig = ''
polkit.addRule(function(action, subject) {
if (subject.isInGroup("wheel")) {
return polkit.Result.YES;
}
});
'';
security.pam.loginLimits = [
{
domain = "*";
type = "soft";
item = "nofile";
value = "4096";
}
{
domain = "*";
type = "hard";
item = "nofile";
value = "10240";
}
];
}