-
Notifications
You must be signed in to change notification settings - Fork 0
/
default.nix
259 lines (227 loc) · 5.8 KB
/
default.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
{ inputs, config, pkgs, extraHomeModules, spkgs, username, ... }:
let
theme = "${pkgs.base16-schemes}/share/themes/gruvbox-dark-hard.yaml";
# wallpaper = pkgs.runCommand "~/Wallpapers/wallpaper.png" {} ''
# COLOR=$(${pkgs.yq}/bin/yq -r .base00 ${theme})
# COLOR="#"$COLOR
# ${pkgs.imagemagick}/bin/magick convert -size 1920x1080 xc:$COLOR $out
# '';
in {
imports =
[
./hardware-configuration.nix # Include the results of the hardware scan.
./variables.nix
./nixos-modules
./disko-config.nix
./sops.nix
inputs.home-manager.nixosModules.home-manager
];
nix.settings.experimental-features = [ "nix-command" "flakes" ];
nixpkgs.config.allowUnfree = true;
time.timeZone = "Europe/Warsaw";
security.rtkit.enable = true;
hardware = {
pulseaudio.enable = false;
xone.enable = true; #for xbox controller
xpadneo.enable = true;
};
system = {
stateVersion = "${config.variables.stateVersion}";
userActivationScripts = {
installDoomEmacs = ''
if [ ! -d "$XDG_CONFIG_HOME/emacs" ]; then
${pkgs.git}/bin/git clone --depth 1 https://github.com/doomemacs/doomemacs ~/.config/emacs
fi
'';
};
};
users.mutableUsers = false;
users.users."${username}" = {
isNormalUser = true;
description = "My HP Omen laptop nixos";
extraGroups = [ "networkmanager" "wheel" "docker" "libvirtd" "audio" ];
shell = pkgs.zsh;
#initialPassword = "test";
hashedPasswordFile = config.sops.secrets.omen-password.path;
packages = with pkgs; [
## Emacs itself
binutils # native-comp needs 'as', provided by this
# 28.2 + native-comp
((emacsPackagesFor emacs-unstable).emacsWithPackages
(epkgs: [
epkgs.vterm
epkgs.treesit-grammars.with-all-grammars
epkgs.mu4e
epkgs.org-mime
]))
## Doom dependencies
git
(ripgrep.override {withPCRE2 = true;})
gnutls # for TLS connectivity
## Optional dependencies
fd # faster projectile indexing
imagemagick # for image-dired
pinentry-emacs # in-emacs gnupg prompts
zstd # for undo-fu-session/undo-tree compression
## Module dependencies
# :checkers spell
(aspellWithDicts (ds: with ds; [ en en-computers en-science ]))
# :tools editorconfig
editorconfig-core-c # per-project style config
# :tools lookup & :lang org +roam
sqlite
# :lang latex & :lang org (latex previews)
texlive.combined.scheme-medium
# :lang nix
nixfmt-classic
#nixd
nil
# :lang lisp
sbcl
# :lang sh
shellcheck
# :lang typescript
javascript-typescript-langserver
deno
# :lang go
# go
# gopls
# gotests
# gomodifytags
# gore
# gotools
# :lang ruby
ruby
rbenv
rubocop
isync # mu4e related
];
};
environment.systemPackages = with pkgs; [
ripgrep
fd
vim
wget
git
neovim
base16-schemes
htop
brightnessctl
networkmanagerapplet
arandr
zip
unzip
p7zip
nvtopPackages.full
blueman
killall
# TODO move this to hypr config?
pavucontrol
pamixer
async-profiler
gparted
distrobox
# for lutris winetriks
libsForQt5.kdialog
cabextract
libreoffice
# backup
pika-backup
# TODO move to module
wineWowPackages.waylandFull
#wineWowPackages.stable
winetricks
inputs.umu.packages.${pkgs.system}.umu
];
programs = {
zsh.enable = true;
light.enable = true;
nm-applet.enable = true;
steam = {
enable = true;
protontricks.enable = true;
};
gnupg.agent = {
enable = true;
enableSSHSupport = true;
};
};
dov = {
windowManager = {
i3.enable = false;
plasma6.enable = false;
xmonad.enable = false;
plasma5.enable = false;
hypr.enable = true;
};
services = {
jellyfin.enable = false;
syncthing.enable = true;
};
gaming.minecraft.enable = true;
};
fonts.packages = with pkgs; [
nerdfonts
noto-fonts
noto-fonts-cjk
noto-fonts-emoji
liberation_ttf
fira-code
fira
fira-code-symbols
mplus-outline-fonts.githubRelease
dina-font
proggyfonts
emacs-all-the-icons-fonts
emacsPackages.all-the-icons
font-awesome_5
source-code-pro
];
stylix = {
enable = true;
image = ./wallpapers/wallpaper.png;
# this can be used when we are using not base16 scheme but auto generated
# to set dark colors as more prefered
#polarity = "dark";
base16Scheme = theme;
fonts = {
serif = {
package = pkgs.dejavu_fonts;
name = "DejaVu Serif";
};
sansSerif = {
package = pkgs.dejavu_fonts;
name = "DejaVu Sans";
};
monospace = {
package = pkgs.dejavu_fonts;
name = "DejaVu Sans Mono";
};
emoji = {
package = pkgs.noto-fonts-emoji;
name = "Noto Color Emoji";
};
};
};
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
backupFileExtension = "backup";
extraSpecialArgs = { inherit inputs spkgs username; };
users."${username}" = {
imports = [
./home.nix
#inputs.impermanence.nixosModules.home-manager.impermanence
] ++ extraHomeModules;
#dconf.settings."org/gnome/desktop/interface".font-name = lib.mkForce "JetBrainsMono Nerd Font 12";
};
};
virtualisation.vmVariant = {
# following configuration is added only when building VM with build-vm
virtualisation = {
memorySize = 8192; # Use 2048MiB memory.
cores = 6;
};
};
networking.firewall.enable = true;
}