-
Notifications
You must be signed in to change notification settings - Fork 0
/
configuration.nix
235 lines (195 loc) · 5.72 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
{ config, lib, pkgs, ... }:
let
moz_overlay = import (builtins.fetchTarball https://github.com/mozilla/nixpkgs-mozilla/archive/master.tar.gz);
home-manager = builtins.fetchTarball "https://github.com/nix-community/home-manager/archive/release-24.05.tar.gz";
nix-alien-pkgs = import (
builtins.fetchTarball "https://github.com/thiagokokada/nix-alien/tarball/master"
) { };
in
{
nixpkgs.overlays = [ moz_overlay ];
nixpkgs.config.packageOverrides = pkgs: {
nur = import (builtins.fetchTarball "https://github.com/nix-community/NUR/archive/master.tar.gz") {
inherit pkgs;
};
};
imports =
[
./hardware-configuration.nix
(import "${home-manager}/nixos")
];
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
nix.settings.experimental-features = [ "nix-command" "flakes" ];
networking.hostName = "nixos";
networking.networkmanager.enable = true;
time.timeZone = "Asia/Kolkata";
i18n.defaultLocale = "en_US.UTF-8";
nixpkgs.config.allowUnfree = true;
hardware.pulseaudio.enable = true;
environment.pathsToLink = [ "/libexec" ];
services.xserver = {
enable = true;
xkb.layout = "us";
desktopManager = {
xterm.enable = false;
};
windowManager.i3 = {
enable = true;
extraPackages = with pkgs; [
dmenu #application launcher most people use
i3status # gives you the default i3 status bar
i3lock #default i3 screen locker
i3blocks #if you are planning on using i3blocks over i3status
];
};
};
services.displayManager = {
defaultSession = "none+i3";
};
programs.zsh.enable = true;
programs.dconf.enable = true;
programs.nix-ld.enable = true;
users.users.manan = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "audio" ];
shell = pkgs.zsh;
packages = with pkgs; [
];
};
home-manager.users.manan = {
home.stateVersion = "24.05";
dconf = {
enable = true;
settings."org/gnome/desktop/interface".color-scheme = "prefer-dark";
};
gtk = {
enable = true;
theme = {
name = "Adwaita-dark";
package = pkgs.gnome.gnome-themes-extra;
};
};
home.pointerCursor = {
package = pkgs.gnome.adwaita-icon-theme;
name = "Adwaita";
size = 16;
};
home.sessionVariables = {
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";
};
xdg.userDirs = {
enable = true;
createDirectories = true;
desktop = "${config.home-manager.users.manan.home.homeDirectory}/system/desktop";
download = "${config.home-manager.users.manan.home.homeDirectory}/downloads";
templates = "${config.home-manager.users.manan.home.homeDirectory}/system/templates";
publicShare = "${config.home-manager.users.manan.home.homeDirectory}/system/public";
documents = "${config.home-manager.users.manan.home.homeDirectory}/documents";
music = "${config.home-manager.users.manan.home.homeDirectory}/media/music";
pictures = "${config.home-manager.users.manan.home.homeDirectory}/media/photos";
videos = "${config.home-manager.users.manan.home.homeDirectory}/media/videos";
};
home.sessionPath = [
"$XDG_BIN_HOME"
"$HOME/go/bin"
];
systemd.user.sessionVariables = config.home-manager.users.manan.home.sessionVariables;
programs.kitty = {
enable = true;
font = {
package = pkgs.jetbrains-mono;
name = "JetBrains Mono";
size = 16;
};
theme = "Kaolin Aurora";
};
programs.zsh = {
enable = true;
enableCompletion = true;
autosuggestion.enable = true;
syntaxHighlighting.enable = true;
shellAliases = {
ll = "ls -l";
update = "sudo nixos-rebuild switch";
v = "nvim";
vi = "nvim";
vim = "nvim";
};
history = {
size = 10000;
};
oh-my-zsh = {
enable = true;
plugins = [ "git" "thefuck" ];
theme = "robbyrussell";
};
};
programs.git = {
enable = true;
userName = "Manan Chawla";
userEmail = "mananchawla10@gmail.com";
};
programs.neovim.enable = true;
programs.vscode = {
enable = true;
package = pkgs.vscodium;
extensions = with pkgs.vscode-extensions; [
asvetliakov.vscode-neovim
bmewburn.vscode-intelephense-client
];
};
programs.firefox = {
enable = true;
package = pkgs.latest.firefox-nightly-bin;
profiles.default = {
id = 0;
name = "default";
isDefault = true;
extensions = with pkgs.nur.repos.rycee.firefox-addons; [
ublock-origin
darkreader
youtube-recommended-videos
];
settings = {
"browser.newtabpage.activity-stream.enabled" = false;
"sidebar.revamp" = true;
"sidebar.verticalTabs" = true;
};
};
};
home.packages = with pkgs; [
cinnamon.nemo
thefuck
nix-alien-pkgs.nix-alien
vscodium
dbeaver-bin
];
};
programs.neovim = {
enable = true;
defaultEditor = true;
};
programs.tmux.enable = true;
virtualisation.docker.rootless = {
enable = true;
setSocketVariable = true;
};
environment.systemPackages = with pkgs; [
wget
git
];
# Some programs need SUID wrappers, can be configured further or are
# started in user sessions.
# programs.mtr.enable = true;
# programs.gnupg.agent = {
# enable = true;
# enableSSHSupport = true;
# };
system.copySystemConfiguration = true;
system.stateVersion = "24.05";
}