-
Notifications
You must be signed in to change notification settings - Fork 0
/
system.nix
195 lines (178 loc) 路 4.1 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
{ inputs, config, pkgs, username, hostname, pkgs-stable, ... }:
let
inherit (import ./options.nix)
theLocale theTimezone gitUsername
theShell wallpaperDir wallpaperGit
theLCVariables theKBDLayout flakeDir
theme 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}";
networking.extraHosts = ''
172.25.161.30 esp-vcenter.mitesp.local
172.25.161.34 esp-psc.mitesp.local
165.22.52.204 simple-web.me
'';
#Firewall
networking.firewall.enable = useFirewall;
networking.firewall.allowedTCPPorts = firewallPorts;
# 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";
hashedPassword = "$6$YdPBODxytqUWXCYL$AHW1U9C6Qqkf6PZJI54jxFcPVm2sm/XWq3Z1qa94PFYz0FF.za9gl5WZL/z/g4nFLQ94SSEzMg5GMzMjJ6Vd7.";
isNormalUser = true;
description = "${gitUsername}";
extraGroups = [ "networkmanager" "wheel" "libvirtd" "docker" "audio" "pulse-access" "qemu-libvirtd" "kvm" ];
shell = pkgs.${theShell};
ignoreShellProgramCheck = true;
packages = (with pkgs; [
#USER_PKG
])
++
(with pkgs-stable; [
textsnatcher
hdparm
nasm
pwninit
steam-run
gef
patchelf
qbittorrent-qt5
scrcpy
sqlmap
exploitdb
apktool
frida-tools
virtiofsd
spice-gtk
#STABLE_USER
]);
};
};
environment.variables = {
FLAKE = "${flakeDir}";
POLKIT_BIN = "${pkgs.polkit_gnome}/libexec/polkit-gnome-authentication-agent-1";
};
environment.systemPackages = (with pkgs; [
networkmanager-fortisslvpn
bun
go-ethereum
gcc
openssl
netcat
pavucontrol
pciutils
pulseeffects-legacy
plocate
gnupg
railway
ghidra
jdk
nmap
gobuster
metasploit
dex2jar
android-tools
file
tshark
sshpass
motrix
inetutils
netdiscover
exiftool
hexedit
binwalk
thc-hydra
openfortivpn
dig
stunnel
tcpdump
samba4Full
enum4linux-ng
openvpn
wireshark
zip
steghide
mangohud
lutris
protonup-qt
wine64
wineWowPackages.waylandFull
winetricks
wineWowPackages.stable
tcptraceroute
hyprpicker
libxcrypt
john
cava
firefox
dbeaver-bin
musl
libxml2
#SYSTEM_PKG
])
++
(with pkgs-stable; [
android-studio
xz
#STABLE_SYSTEM
]);
environment.etc."ppp/options".text = "ipcp-accept-remote";
virtualisation.docker.enable = true;
virtualisation.virtualbox.host.enable = true;
virtualisation.waydroid.enable = true;
# virtualisation.vmware.host.enable = true;
services.openssh.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";
}