-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconfiguration.nix
587 lines (539 loc) · 13 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
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
# 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, lib, pkgs, ... }:
{
imports = [ # Include the results of the hardware scan.
./hardware-configuration.nix
];
# I don't think this works
# systemd = {
# services = {
# linkzz = {
# enable = true;
# description = "Symlink important interpreters";
# wantedBy = [ "multi-user.target" ];
# unitConfig = { type = "simple"; };
# serviceConfig = {
# ExecStart = ''
# sh -c "ln -sfn '$(which bash)' /usr/bin/bash
# ln -sfn '/usr/bin/bash' /bin/bash
# ln -sfn '$(which zsh)' /usr/bin/zsh
# ln -sfn /usr/bin/zsh /bin/zsh
# ln -sfn '$(which dash)' /usr/bin/dash
# ln -sfn /usr/bin/dash /bin/dash
# ln -sfn '$(which perl)' /usr/bin/perl
# ln -sfn '$(which python3)' /usr/bin/python3"
# '';
# };
# };
# };
# };
environment = {
localBinInPath = true;
homeBinInPath = true;
sessionVariables = rec {
ZDOTDIR = "$HOME/.config/zsh";
XDG_CACHE_HOME = "$HOME/.cache";
XDG_CONFIG_HOME = "$HOME/.config";
XDG_DATA_HOME = "$HOME/.local/share";
XDG_STATE_HOME = "$HOME/.local/state";
XDG_BIN_HOME = "$HOME/.local/bin";
RUSTUP_HOME = "$XDG_DATA_HOME/rustup";
CARGO_HOME = "$XDG_DATA_HOME/cargo";
# RUSTUP_HOME = "$HOME/.local/share/rustup";
# CARGO_HOME = "$HOME/.local/share/cargo";
HISTFILE = "$XDG_CACHE_HOME/shellhist";
# HISTFILE = "$HOME/.cache/shellhist";
SUDO_PROMPT = "yo what ur password dawg > ";
#NIXOS_OZONE_WL = "1";
MOZ_ENABLE_WAYLAND = "1";
};
# to fix the env for my scripts
# This runs on every shell startup for some reason, and doesn't work anyways
#extraInit = ''
# ln -sfn '$(which bash)' /usr/bin/bash
# ln -sfn '/usr/bin/bash' /bin/bash
# ln -sfn '$(which zsh)' /usr/bin/zsh
# ln -sfn /usr/bin/zsh /bin/zsh
# ln -sfn '$(which dash)' /usr/bin/dash
# ln -sfn /usr/bin/dash /bin/dash
# ln -sfn '$(which perl)' /usr/bin/perl
# ln -sfn '$(which python3)' /usr/bin/python3
#'';
systemPackages = with pkgs; [
brave
junction
floorp
# vscode
vscodium-fhs
codeium # Must be symlinked into the .codeium directory
vesktop # build is broken
jan
libreoffice-fresh
perl538Packages.PLS
perl538Packages.PerlTidy
nodePackages_latest.bash-language-server
nodePackages_latest.pyright
# python-qt
shellcheck
shfmt
typescript
nixfmt
nixd
rustup
nodejs_21
cmake
clang
llvmPackages.bintools
libgcc
gnumake
mold
pkg-config
# glib
nix-tree
nix-du
neofetch
fastfetch
jq
yq
xsv
atuin
zoxide
chafa
exiftool
lscolors
trash-cli
pandoc
glow
netcat
socat
#csvkit # requires pandas, that build is broken
poppler_utils
gh
git-extras
delta
bat
tealdeer
fortune
clolcat # TODO: Symlink lolcat to clolcat
libnotify
inotify-tools
fzf
fzy
yad
gum
dash
python312 # TODO: Update to 3.13 if out of alpha
wget
xdg-ninja
fd
sysstat
psmisc
lsof
ripgrep
eza
ffmpeg
imagemagick
graphicsmagick
killall
ydotool
kitty
alacritty
btop
nvtop
ranger
difftastic
complgen
grim
slurp
swappy
wl-clipboard
kitti3
playerctl
kooha
gimp-with-plugins
obs-studio
vlc
mpv
mpvScripts.mpris
mpvScripts.cutter
# openai-whisper
v4l-utils
yt-dlp
prismlauncher
temurin-jre-bin-8 # TODO: Figure out if these work for prismlauncher
temurin-jre-bin-17
rofi-wayland
rofimoji
waycheck
xwaylandvideobridge
xorg.xeyes
adw-gtk3
# gradience
# google-cursor
# gnome-browser-connector
# gnome-extension-manager
# gnome.gnome-tweaks
# gnome.gnome-font-viewer
# gnome.gnome-calculator
# gnome.file-roller
# mate.mate-polkit
# xfce.xfce4-terminal
# xfce.tumbler
# xfce.catfish
# xfce.xfce4-screenshooter # TODO: Remove if this doesn't work on hyprland
# xfce.mousepad
loupe
hyprpaper
hyprpicker
hyprlock
hypridle
mangohud
];
};
programs = {
dconf.enable = true;
thunar = {
enable = true;
plugins = with pkgs.xfce; [
thunar-archive-plugin
thunar-media-tags-plugin
];
};
hyprland = {
enable = true;
portalPackage = pkgs.xdg-desktop-portal-hyprland;
xwayland.enable = true;
};
steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
};
gamemode = {
enable = true;
enableRenice = true;
};
gamescope = {
enable = true;
capSysNice = true;
};
git = {
enable = true;
package = pkgs.gitFull;
};
neovim = {
enable = true;
defaultEditor = true;
viAlias = true;
vimAlias = true;
};
tmux = {
enable = true;
# newSession = true;
};
zsh = {
enable = true;
enableCompletion = true;
enableBashCompletion = true;
vteIntegration = false;
syntaxHighlighting.enable = true; # TODO: Change this
};
firefox = {
enable = true;
package = pkgs.firefox-bin;
};
xwayland = { enable = true; };
virt-manager = { enable = true; };
i3lock = {
enable = true;
package = pkgs.i3lock-color;
};
nix-ld = {
enable = true;
libraries = with pkgs; [
openssl
glib
gtk4
gtk4-layer-shell
# libgudev
libudev-zero
libudev0-shim
];
};
};
services = {
xserver = {
enable = true;
autorun = false;
# They change the syntax on unstable
xkb = {
layout = "us";
variant = "";
# This might work, idk
options = "caps:escape";
};
# layout = "us";
# xkbVariant = "";
videoDrivers = [ "nvidia" ];
excludePackages = [ pkgs.xterm ];
# displayManager = {
# sddm = {
# enable = true;
# autoNumlock = true;
# wayland = { enable = true; };
# };
# };
# Temporary, remove later
desktopManager = {
plasma5 = {
enable = true;
phononBackend = "vlc";
};
};
# libinput = {
# enable = true;
# mouse = { accelProfile = "flat"; };
# touchpad = {
# accelProfile = "adaptive";
# disableWhileTyping = true;
# naturalScrolling = true;
# #sendEventsMode = "disabled-on-external-mouse";
# tapping = true;
# };
# };
windowManager = {
i3 = {
enable = true;
extraPackages = with pkgs; [ i3status ];
updateSessionEnvironment = true;
};
};
};
printing.enable = true;
blueman.enable = true;
# gnome.gnome-keyring.enable = true;
asusd = {
enable = true;
enableUserService = true;
};
switcherooControl.enable = true;
power-profiles-daemon.enable = true;
supergfxd.enable = true;
# systemd.services.supergfxd.path = [ pkgs.pciutils ]; # might be needed until they fix this
#nextdns.enable = true;
earlyoom = {
enable = true;
enableNotifications = true;
};
pipewire = {
enable = true;
alsa = {
enable = true;
support32Bit = true;
};
pulse.enable = true;
jack.enable = true;
};
# picom = {
# enable = true;
# TODO: research more into this
# };
systemd-lock-handler.enable = true;
logind = {
killUserProcesses = true;
lidSwitch = "suspend";
lidSwitchDocked = "ignore";
lidSwitchExternalPower = "ignore";
powerKey = "poweroff";
};
};
users = {
defaultUserShell = pkgs.zsh;
users = {
vlk = {
isNormalUser = true;
description = "vlk";
extraGroups = [ "networkmanager" "wheel" ];
shell = pkgs.zsh;
};
};
};
systemd = {
ctrlAltDelUnit = "";
extraConfig = ''
DefaultTimeoutStartSec=30s
DefaultTimeoutStopSec=30s
DefaultDeviceTimeoutSec=20s
'';
user = {
extraConfig = ''
DefaultTimeoutStartSec=30s
DefaultTimeoutStopSec=30s
DefaultDeviceTimeoutSec=20s
'';
};
};
fonts = {
enableDefaultPackages = true;
packages = with pkgs; [
twitter-color-emoji
nerdfonts
lato
fira-code-nerdfont
];
fontconfig = {
enable = true;
allowBitmaps = false;
antialias = true;
defaultFonts = {
emoji = [ "Twemoji" ];
monospace = [ "FiraCode Nerd Font" ];
sansSerif = [ "Lato" ];
serif = [ "Tinos Nerd Font" ];
};
hinting = {
enable = true;
autohint = false;
style = "slight";
};
};
};
xdg = {
# autostart.enable = false;
# icons.enable = true;
# menus.enable = true;
# sounds.enable = true;
mime = {
enable = true;
defaultApplications = {
"application/pdf" = "evince.desktop";
"text/xml" = [ "mousepad.desktop" "nvim.desktop" ];
"image/png" = "ristretto.desktop";
};
};
portal = {
enable = true;
xdgOpenUsePortal = true;
extraPortals = with pkgs; [ xdg-desktop-portal-gtk ];
};
};
# qt = {
# enable = true;
# platformTheme = "qt5ct";
# style = "kvantum";
# };
# Open ports in the firewall.
# networking.firewall.allowedTCPPorts = [ ... ];
# networking.firewall.allowedUDPPorts = [ ... ];
# Or disable the firewall altogether.
# networking.firewall.enable = false;
networking = {
hostName = "iphone";
networkmanager = { enable = true; };
firewall = { enable = true; };
};
time = { timeZone = "America/Chicago"; };
i18n = {
defaultLocale = "en_US.UTF-8";
extraLocaleSettings = {
LC_ADDRESS = "en_US.UTF-8";
LC_IDENTIFICATION = "en_US.UTF-8";
LC_MEASUREMENT = "en_US.UTF-8";
LC_MONETARY = "en_US.UTF-8";
LC_NAME = "en_US.UTF-8";
LC_NUMERIC = "en_US.UTF-8";
LC_PAPER = "en_US.UTF-8";
LC_TELEPHONE = "en_US.UTF-8";
LC_TIME = "en_US.UTF-8";
};
};
sound = {
enable = true;
# mediaKeys = {
# enable = true;
# volumeStep = 5;
# };
};
security.rtkit.enable = true;
nix.gc = {
automatic = true;
options = "--delete-older-than 7d";
};
# Allow unfree packages
nixpkgs.config.allowUnfree = true;
# virtualisation = {
# libvirtd = {
# enable = true;
zramSwap = {
enable = true;
# algorithm = "zstd";
# memoryMax = 8589934592; # Hope this is 8gb
memoryPercent = 25;
priority = 5;
};
boot = {
# initrd = {
# availableKernelModules = [
# "xhci_pci"
# "thunderbolt"
# "vmd"
# "nvme"
# "usbhid"
# ];
# };
kernelModules = [ "nvidia" "v4l2loopback" ];
# extraModulePackages = [
#
# ];
loader = {
systemd-boot = { enable = true; };
efi = { canTouchEfiVariables = true; };
};
blacklistedKernelModules = [ "nouveau" ];
kernel = {
sysctl = {
"vm.max_map_count" = 2147483647;
"kernel.split_lock_mitigate" = 0;
};
};
kernelPackages = pkgs.linuxPackages_xanmod_latest;
};
hardware = {
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [ intel-media-driver intel-ocl ];
};
nvidia = {
modesetting.enable = true;
powerManagement.enable = true;
powerManagement.finegrained = false;
dynamicBoost.enable = true;
forceFullCompositionPipeline = false;
open = false;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
bluetooth = {
enable = true;
powerOnBoot = false;
};
pulseaudio.enable = false;
xone.enable = false;
cpu.intel = { updateMicrocode = true; };
};
fileSystems."/bruh" = {
device = "/dev/disk/by-uuid/2af5d44b-5f32-4ffb-85ed-c6f45998693d";
fsType = "ext4";
};
# This value determines the NixOS release from which the default
# settings for stateful data, like file locations and database versions
# on your system were taken. It‘s perfectly fine and recommended to leave
# this value at the release version of the first install of this system.
# Before changing this value read the documentation for this option
# (e.g. man configuration.nix or on https://nixos.org/nixos/options.html).
system.stateVersion = "23.11"; # Did you read the comment?
}