-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfiguration.nix
389 lines (384 loc) · 10 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
{ inputs, config, lib, pkgs, ... }@args:
{
imports = [ ./hardware-configuration.nix ./cachix.nix inputs.home-manager.nixosModules.home-manager ];
documentation.nixos.enable = false;
nix.settings = {
substituters = [
"https://nix-community.cachix.org"
"https://nix-gaming.cachix.org"
"https://stardustxr.cachix.org"
"https://eigenvalue.cachix.org"
];
trusted-public-keys = [
"nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs="
"nix-gaming.cachix.org-1:nbjlureqMbRAxR1gJ/f3hxemL9svXaZF/Ees8vCUUs4="
"stardustxr.cachix.org-1:mWSn8Ap2RLsIWT/8gsj+VfbJB6xoOkPaZpbjO+r9HBo="
"eigenvalue.cachix.org-1:ykerQDDa55PGxU25CETy9wF6uVDpadGGXYrFNJA3TUs="
];
};
environment.persistence = {
"/persistent" = {
hideMounts = true;
directories = [
"/var/log"
"/var/lib/bluetooth"
"/var/lib/nixos"
"/var/lib/systemd/coredump"
"/etc/NetworkManager/system-connections"
];
users.me = {
directories = [
{ directory = ".gnupg"; mode = "0700"; }
{ directory = ".ssh"; mode = "0700"; }
{ directory = ".local/share/keyrings"; mode = "0700"; }
".config/qt6ct" # TODO: move to declarative config
".config/quickshell"
".config/wallpapers"
{ directory = ".config/omf"; mode = "0700"; } # TODO: move to declarative config
{ directory = ".config/pipewire"; mode = "0700"; }
".config/google-chrome"
".config/fish"
".config/itch"
".config/tits"
".config/gallery-dl"
".mozilla/firefox"
".openvscode-server"
".aws"
".wine"
".local/share/pnpm"
".local/share/fish"
".local/share/omf"
".local/share/Steam"
".cargo" # for .cargo/bin/
"git"
"game"
];
};
};
};
boot = {
loader = {
grub = {
enable = true;
device = "nodev";
efiSupport = true;
useOSProber = true;
gfxmodeEfi = "1920x1080";
};
efi.canTouchEfiVariables = true;
};
kernelPackages = pkgs.linuxPackages_zen;
};
qt.enable = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
#nixpkgs.config.cudaSupport = true;
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (lib.getName pkg) [
"google-chrome"
"steam"
"steam-unwrapped"
"steam-run"
"reaper"
# for wivrn
"cuda-merged"
"cuda_cuobjdump"
"cuda_gdb"
"cuda_nvcc"
"cuda_nvdisasm"
"cuda_nvprune"
"cuda_cccl"
"cuda_cudart"
"cuda_cupti"
"cuda_cuxxfilt"
"cuda_nvml_dev"
"cuda_nvrtc"
"cuda_nvtx"
"libnpp"
"libcublas"
"libcufft"
"libcurand"
"libcusparse"
"libnvjitlink"
"cudnn"
"cuda_profiler_api"
"cuda_sanitizer_api"
"libcusolver"
];
hardware = {
graphics.enable = true; # hyprland
nvidia = {
modesetting.enable = true;
powerManagement.enable = true;
};
bluetooth = {
enable = true;
powerOnBoot = true;
};
};
security.rtkit.enable = true;
networking = {
hostName = "pc";
networkmanager.enable = true;
firewall.enable = false;
};
services = {
earlyoom.enable = true;
tailscale.enable = true;
transmission = {
enable = true;
user = "me";
settings.download-dir = "/mnt/usb/game/";
};
pipewire = {
enable = true;
alsa = {
enable = true;
support32Bit = true;
};
pulse.enable = true;
jack.enable = true;
};
openssh.enable = true;
sunshine.enable = true;
openvscode-server = {
enable = true;
user = "me";
host = "0.0.0.0";
};
udev.extraRules = ''
SUBSYSTEM="usb", ATTR{idVendor}=="2833", ATTR{idProduct}=="0186", MODE="0660" group="plugdev", symlink+="ocuquest%n"
'';
#wivrn = {
# enable = true;
# autoStart = true;
#};
};
virtualisation.docker.enable = true;
programs = {
fish.enable = true;
steam.enable = true;
direnv.enable = true;
git.enable = true;
adb.enable = true;
firefox = import ./modules/firefox.nix args;
neovim = {
enable = true;
defaultEditor = true;
configure = {
customRC = ''
:set guicursor=a:ver25
:set number relativenumber
highlight Normal ctermbg=NONE guibg=NONE
augroup user_colors
autocmd!
autocmd ColorScheme * highlight Normal ctermbg=NONE guibg=NONE
augroup END
'';
};
};
nix-ld.enable = true;
nix-ld.libraries = with pkgs; [
#libinput udev # wlkey
glib # gobject for electron
expat
cairo # playwright
alsa-lib # asound for playwright (and soloud)
xorg.libxcb # playwright
xorg.libX11 # playwright
xorg.libXcomposite # playwright
xorg.libXdamage # playwright
xorg.libXext # playwright
xorg.libXfixes # playwright
xorg.libXrandr # playwright
nspr
dbus
atk
cups
libdrm
pango # playwright
libxkbcommon # playwright
mesa # gbm for playwright
nss # playwright
gtk3
vulkan-loader
libGL # unity
];
};
time.timeZone = "Australia/Brisbane";
users = {
users = {
me = {
hashedPassword = "$y$j9T$cidkoWm0GGdY640fxDlg1.$MtxmsHZ0XIO7PvPGss/K0WPBE7NwJVhvH38gbg/gCpA";
isNormalUser = true;
extraGroups = [ "wheel" "docker" "adbusers" ];
shell = pkgs.fish;
};
root = {
initialHashedPassword = "";
shell = pkgs.fish;
};
};
extraGroups = {
vboxusers.members = [ "me" ];
};
};
home-manager.users.me = args2:
let
combined = args // args2;
in
lib.mkMerge [
{
home.stateVersion = "23.11"; # initial version. NEVER EVER CHANGE!
home.pointerCursor = {
gtk.enable = true;
name = "miku-cursor";
package = inputs.miku-cursor.packages.${pkgs.system}.default;
size = 24;
};
gtk = {
theme.name = "Adwaita-dark";
font = {
name = "Unicorn Scribbles";
package = inputs.unicorn-scribbles-font.packages.${pkgs.system}.default;
size = 10;
};
};
services.wlsunset = { enable = true; latitude = "-27.5"; longitude = "153"; };
}
(import ./home-manager/hyprland.nix combined)
(import ./home-manager/kitty.nix combined)
];
environment.systemPackages = with pkgs; [
home-manager
cachix
file
pcmanfm
pavucontrol
google-chrome
curl
cava
wlsunset
gallery-dl
qt6.qtmultimedia
qt6.qtwayland # idk if this fixes QT_QPA_PLATFORM=wayland
# qt6.qtbase # eglfs_kms for wayland-compositor
qt6.qtvirtualkeyboard # optional dependency for wayland-compositor
vulkan-loader # libvulkan for wayland-compositor
kdePackages.qt6ct # xdg-desktop-portal for file dialog
xdg-utils # open, xdg-open
ffmpeg-full
rlwrap
_7zz
unrar-wrapper
wf-recorder
clang-tools
nixpkgs-fmt
reaper
jetbrains.idea-community
vesktop
btop
bat
luajit
/*((mommy.override {
mommySettings =
let
cargo-mommy = import ./modules/cargo-mommy.nix;
moods = cargo-mommy.withMoods [
"mommy"
"mommy"
"mommy"
"chill"
"chill"
"chill"
"thirsty"
"thirsty"
"thirsty"
"yikes"
];
in
{
caregiver = "uwu/NixOWOS";
sweetie = "cutie";
suffix = "//~/~/ :3/ :3/ uwu/ owo";
color = "182/183/218/219/225";
} // moods;
}).overrideAttrs (self: super: {
postInstall = builtins.replaceStrings
[ "--set-default MOMMY_OPT_CONFIG_FILE " ]
[ "--add-flags -c --add-flags " ]
super.postInstall;
patches = [ ./modules/mommy_yikes.patch ];
}))*/
# vs code
nixd
# image manipulation
krita
graphicsmagick
# debug
gdbHostCpuOnly
# quickshell
inputs.quickshell.packages.${pkgs.system}.default
# game
dxvk
winetricks
gamescope
gamemode
inputs.nix-gaming.packages.${pkgs.system}.wine-tkg
samba # ntlm_auth for wine
prismlauncher
r2modman
flatpak
keepassxc
# lumafly
# vr
(sidequest.overrideAttrs (super: {
nativeBuildInputs = super.nativeBuildInputs ++ [ wrapGAppsHook ];
}))
alvr
android-tools
# inputs.hwfetch.packages.${pkgs.system}.default
# inputs.verdi.packages.${pkgs.system}.default
# inputs.asciinema.packages.${pkgs.system}.default
inputs.stardust-telescope.packages.${pkgs.system}.telescope
inputs.stardust-telescope.packages.${pkgs.system}.flatscreen
] ++ /* qti */ inputs.qti.packages.${pkgs.system}.qti-all;
fonts.packages = with pkgs; [
inputs.unicorn-scribbles-font.packages.${pkgs.system}.default
twemoji-color-font
noto-fonts
noto-fonts-cjk-sans
nerd-fonts.fantasque-sans-mono
];
environment = {
pathsToLink = [ "/share/qti" ];
sessionVariables = {
# hyprland
__GL_GSYNC_ALLOWED = "0";
__GL_VRR_ALLOWED = "0";
QT_QPA_PLATFORMTHEME = "qt6ct";
QT_WAYLAND_DISABLE_WINDOWDECORATION = "1";
QSG_USE_SIMPLE_ANIMATION_DRIVER = "0"; # fix quickshell lag
# hyprland x nvidia
LIBVA_DRIVER_NAME = "nvidia";
__GLX_VENDOR_LIBRARY_NAME = "nvidia";
# can fix steam shader precaching pls?
__GL_SHADER_DISK_CACHE_SIZE = "100000000000";
};
};
xdg.portal = {
enable = true;
config = {
common.default = [ "hyprland" "gtk" ];
};
extraPortals = with pkgs; [
xdg-desktop-portal-hyprland
xdg-desktop-portal-gtk
];
};
system = {
autoUpgrade = {
enable = true;
allowReboot = true;
};
stateVersion = "23.11"; # initial version. NEVER EVER CHANGE!
};
}