-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconfiguration.nix
202 lines (189 loc) · 5.59 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
{ config, pkgs, dwm-src, ... }:
{
imports = [
./hardware-configuration.nix
];
nixpkgs.config.allowUnfree = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
i18n.defaultLocale = "en_CA.UTF-8";
time.timeZone = "America/Toronto";
sound.enable = true;
security.rtkit.enable = true;
boot = {
loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
supportedFilesystems = [ "ntfs" ];
extraModulePackages = [
config.boot.kernelPackages.nvidia_x11
];
blacklistedKernelModules = [ "nouveau" "nvidia_drm" "nvidia_modeset" "nvidia" ];
kernelParams = [ "i915.force_probe=4680" ];
};
hardware = {
opengl = {
enable = true;
driSupport = true;
driSupport32Bit = true;
extraPackages = with pkgs; [ intel-media-driver ];
};
nvidia = {
modesetting.enable = true;
powerManagement.enable = false;
powerManagement.finegrained = false;
open = true;
nvidiaSettings = true;
package = config.boot.kernelPackages.nvidiaPackages.stable;
};
pulseaudio.enable = false;
};
programs = {
steam.enable = true;
bash.shellAliases = {
nd = "nix develop";
ndi = "nix develop --impure";
# Rebuild system.
rebuild = "(cd ~/repos/dotfiles && bash rebuild.sh)";
# Open configuration directory in neovim.
conf = "nvim /home/hayden/repos/dotfiles/";
# Print the name of the shell. Useful for seeing if you're in a devshell.
sname = "echo $name";
# Start script for displaying dwm status bar.
stathack = "(cd ~/repos/dotfiles && bash status.sh & disown)";
# Set wallpaper.
wallhack = "feh --bg-fill ~/.wallpaper.png";
};
thunar.enable = true;
};
services = {
# Image thumbnails for Thunar.
tumbler.enable = true;
# Other functionality for Thunar.
gvfs.enable = true;
gnome.gnome-keyring.enable = true;
xserver = {
enable = true;
autoRepeatDelay = 190;
autoRepeatInterval = 30;
xkb = {
layout = "us";
variant = "";
};
windowManager.dwm = {
enable = true;
package = pkgs.dwm.overrideAttrs {
src = dwm-src;
};
};
# Re-enable this for Docker GPU containers. Flakes with nixGL do not need it.
# videoDrivers = ["nvidia"];
};
displayManager = {
sddm.enable = true;
defaultSession = "none+dwm";
};
pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
# If you want to use JACK applications, uncomment this
#jack.enable = true;
};
printing.enable = true;
};
networking = {
hostName = "nixos";
networkmanager.enable = true;
};
virtualisation = {
docker = {
enable = true;
enableNvidia = true;
};
virtualbox.host.enable = true;
};
programs.chromium = {
enable = true;
extraOpts = {
"AutoplayAllowed" = true;
};
};
users.users.hayden = {
isNormalUser = true;
description = "Hayden";
extraGroups = [ "networkmanager" "wheel" "docker" "vboxusers" ];
packages = with pkgs; [
# General.
firefox
google-chrome
xclip
neofetch
ledger
htop
feh
zip
unzip
ncdu
lsof
# Media and content creation.
vlc
ffmpeg
blender
flameshot
inkscape
gimp
audacity
obs-studio
kdePackages.gwenview
qbittorrent
# Gaming.
ppsspp
# Development.
chromium
chromedriver
(python311.withPackages (ps: with ps; [
requests
numpy
pandas
pillow
pip
pyarrow
selenium
]))
ghc
nasm
pyright
docker-compose
sqlitebrowser
cachix
cudaPackages.cudatoolkit
clang-tools
cppcheck
gcc
cmake
gnumake
valgrind
gdb
zig
go
pipewire
pulseaudio
libpulseaudio
pkg-config
];
};
environment.systemPackages = with pkgs; [
vim
dmenu
config.boot.kernelPackages.nvidia_x11
];
# 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.05"; # Did you read the comment?
}