-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsystem.nix
263 lines (245 loc) · 5.09 KB
/
system.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
{ config, pkgs, username, hostname, pkgs-stable, ... }:
let
inherit (import ./options.nix)
theLocale theTimezone gitUsername
theShell theLCVariables theKBDLayout flakeDir
httpProxy socksProxy firewallPorts useFirewall;
in {
imports =
[
./hardware.nix
./config/system
];
# Enable networking
networking.hostName = "${hostname}"; # Define your hostname
networking.networkmanager.enable = true;
networking.proxy.default = "${socksProxy}";
networking.proxy.allProxy = "${socksProxy}";
networking.proxy.rsyncProxy = "${socksProxy}";
networking.proxy.httpProxy = "${httpProxy}";
networking.proxy.httpsProxy = "${httpProxy}";
networking.proxy.ftpProxy = "${httpProxy}";
#systemd.globalEnvironment = {
# HTTP_PROXY="${httpProxy}";
# HTTPS_PROXY="${httpProxy}";
# ALL_PROXY="${socksProxy}";
# RSYNC_PROXY="${socksProxy}";
# FTP_PROXY="${socksProxy}";
#};
networking.extraHosts = ''
165.22.52.204 simple-web.me
'';
#Firewall
networking.firewall.enable = false;
networking.firewall.allowedTCPPorts = if useFirewall == true
then firewallPorts
else [];
# Set your time zone
time.timeZone = "${theTimezone}";
# Select internationalisation properties
i18n.defaultLocale = "${theLocale}";
i18n.extraLocaleSettings = {
LC_ADDRESS = "${theLCVariables}";
LC_IDENTIFICATION = "${theLCVariables}";
LC_MEASUREMENT = "${theLCVariables}";
LC_MONETARY = "${theLCVariables}";
LC_NAME = "${theLCVariables}";
LC_NUMERIC = "${theLCVariables}";
LC_PAPER = "${theLCVariables}";
LC_TELEPHONE = "${theLCVariables}";
LC_TIME = "${theLCVariables}";
};
console.keyMap = "${theKBDLayout}";
# Define a user account.
users = {
mutableUsers = true;
users."${username}" = {
homeMode = "755";
isNormalUser = true;
description = "${gitUsername}";
extraGroups = [ "networkmanager" "wheel" "libvirtd" "docker" "audio" "pulse-access" "qemu-libvirtd" "kvm" "wireshark" ];
shell = pkgs.${theShell};
ignoreShellProgramCheck = true;
packages = (with pkgs; [
networkmanager-fortisslvpn
bun
go-ethereum
gcc
openssl
netcat
gnupg
railway
ghidra
jdk
nmap
gobuster
metasploit
dex2jar
android-tools
file
tshark
sshpass
motrix
inetutils
netdiscover
exiftool
hexedit
binwalk
thc-hydra
openfortivpn
dig
stunnel
samba4Full
enum4linux-ng
openvpn
zip
steghide
mangohud
lutris
protonup-qt
wine64
wineWowPackages.waylandFull
winetricks
wineWowPackages.stable
tcptraceroute
hyprpicker
john
dbeaver-bin
android-studio
zed-editor
deno
#USER_PKG
])
++
(with pkgs-stable; [
qbittorrent
xz
sysstat
dmidecode
textsnatcher
hdparm
nasm
pwninit
steam-run
gef
patchelf
scrcpy
sqlmap
exploitdb
apktool
frida-tools
virtiofsd
spice-gtk
cbonsai
peaclock
putty
anydesk
ntfs3g
nixpkgs-fmt
csvlens
postman
marktext
cava
jadx
qutebrowser-qt5
#STABLE_USER
]);
};
};
environment.variables = {
FLAKE = "${flakeDir}";
POLKIT_BIN = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
};
environment.systemPackages = (with pkgs; [
#SYSTEM_PKG
])
++
(with pkgs-stable; [
curl
git
pciutils
wget
file
inetutils
tcpdump
parted
pulseaudioFull
pavucontrol
pulseeffects-legacy
alsa-utils
htop
btop
libvirt
polkit_gnome
lm_sensors
unzip
unrar
libnotify
v4l-utils
ydotool
wl-clipboard
socat
lsd
lshw
pkg-config
meson
gnumake
ninja
go
nodejs
brightnessctl
toybox
virt-viewer
swappy
ripgrep
appimage-run
networkmanagerapplet
yad
playerctl
nh
fastfetch
libcec
zoxide
#STABLE_SYSTEM
]);
fonts = {
enableDefaultPackages = true;
packages = with pkgs; [
ubuntu_font_family
nerd-fonts.jetbrains-mono
font-awesome
noto-fonts-color-emoji
material-icons
];
fontDir = {
enable = true;
};
};
environment.shells = with pkgs; [ zsh ];
environment.etc."ppp/options".text = "ipcp-accept-remote";
virtualisation.docker.enable = true;
virtualisation.virtualbox.host.enable = true;
virtualisation.waydroid.enable = true;
# Optimization settings and garbage collection automation
nix = {
settings = {
auto-optimise-store = true;
experimental-features = [ "nix-command" "flakes" ];
substituters = ["https://hyprland.cachix.org"];
trusted-public-keys = [
"hyprland.cachix.org-1:a7pgxzMz7+chwVL3/pzj6jIBMioiJM7ypFP8PwtkuGc="
];
};
gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
};
#nixpkgs.config.permittedInsecurePackages = [
# "nix-2.16.2"
# "python-2.7.18.7"
# "python"
#];
system.stateVersion = "23.11";
}