Uploading my nixos dotfiles to gitea

This commit is contained in:
metallaxis committed 2026-10-09 18:40:29 +03:00
commit 5e7911e35d
29 files changed
+1276

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
{ pkgs, system }:
pkgs.mkShell {
name = "dev-static";
buildInputs = with pkgs; [
gnumake
cmake
# Compilers
gcc
musl
musl.dev
pkgsCross.mingwW64.buildPackages.gcc
# Libraries
raylib
pkgsCross.mingwW64.raylib
curl.dev gtk3.dev
# Manuals
man-pages
man-pages-posix
# Debugging
gdb valgrind
];
shellHook = ''
echo "Static Dev system ready: Linux & Windows"
'';
}
+35
View File
@@ -0,0 +1,35 @@
{ pkgs, system }:
pkgs.mkShell {
name = "dev";
buildInputs = with pkgs; [
gnumake
cmake
# Java
maven
gradle
jetbrains.idea
# Compilers
gcc
pkgsCross.mingwW64.buildPackages.gcc
# Libraries
raylib
pkgsCross.mingwW64.raylib
curl.dev gtk3.dev
# Manuals
man-pages
man-pages-posix
# Debugging
gdb valgrind
];
shellHook = ''
echo "Dev system ready: Linux & Windows"
'';
}
+30
View File
@@ -0,0 +1,30 @@
{ config, lib, pkgs, ... }:
{
services.xserver.enable = true;
services.libinput.enable = true;
xdg.portal = {
enable = true;
extraPortals = with pkgs; [
xdg-desktop-portal-hyprland
xdg-desktop-portal-gtk
];
config = {
common = {
default = [ "hyprland" "gtk" ];
};
};
};
services.displayManager = {
enable = true;
defaultSession = "hyprland";
sddm = {
enable = true;
settings.General.GreeterEnvironment = "QT_SCALE_FACTOR=1.5,QT_FONT_DPI=144";
};
};
}
+12
View File
@@ -0,0 +1,12 @@
{ config, pkgs, ... }:
{
fonts.fontconfig.enable = true;
fonts.enableDefaultPackages = true;
fonts.packages = with pkgs; [
nerd-fonts.jetbrains-mono
font-awesome
];
}
+10
View File
@@ -0,0 +1,10 @@
{ config, pkgs, ... }:
{
nix.gc = {
automatic = true;
dates = "weekly";
options = "--delete-older-than 7d";
};
nix.settings.auto-optimise-store = true;
}
+48
View File
@@ -0,0 +1,48 @@
{ pkgs, ... }:
{
environment.systemPackages = with pkgs; [
# Terminal/Shell
kitty tmux
# Text Editor
vim
# Building Tools
pkg-config meson
# Network/Web
wget curl iproute2 nmap thunderbird
# System Utilities
age sops btop fastfetch acpi gparted efibootmgr dunst
libnotify wlogout bzip2 gzip zip unzip gnugrep jq yq-go
cacert brightnessctl lsd p7zip asciinema asciinema-agg
bubblewrap
# Desktop/Hyprland
waybar hyprpaper wofi networkmanagerapplet
# Java
temurin-bin-25
# Programming Language/Tool
python3 nixfmt
# Virtualization
libvirt virt-manager qemu_kvm OVMF swtpm
];
nixpkgs.config.allowUnfreePredicate = pkg: builtins.elem (pkg.pname) [
"vscode"
"steam"
"steam-unwrapped"
];
# --- Native Steam integration ---
programs.steam = {
enable = true;
remotePlay.openFirewall = true;
dedicatedServer.openFirewall = true;
};
}
+57
View File
@@ -0,0 +1,57 @@
{ pkgs, system }:
pkgs.mkShell {
name = "hack";
buildInputs = with pkgs; [
# Binary Exploitation / Reverse Engineering
gcc
gdb
gef # GDB Enhanced Features (pretty stack/heap views)
radare2 # reverse engineering framework
ghidra # NSA decompiler
binwalk # firmware / file carving
file
ltrace
strace
checksec # check binary mitigations
patchelf # Running external binaries on NixOS
# Python
pycdc
(python3.withPackages (ps: with ps; [
pwntools # exploit dev: tubes, asm, ROP, ELF, …
pycryptodome # crypto primitives (AES, RSA, hashes, …)
requests # HTTP
pyotp # OTP
beautifulsoup4 # HTML scraping
sympy # symbolic math (useful in crypto)
z3-solver # SMT solver (constraint solving, reversing)
pillow # image manipulation (stego)
gmpy2 # fast big-integer math (RSA attacks)
]))
# Web Exploitation
ffuf
# Cryptography
openssl
# Network Exploitation
openvpn
sqlmap
# Stenography
stegseek
steghide
exiftool
# Manuals
man-pages
man-pages-posix
];
shellHook = ''
echo "Hacking system ready"
'';
}
+24
View File
@@ -0,0 +1,24 @@
{ config, lib, pkgs, ... }:
{
programs.hyprland = {
enable = true;
xwayland.enable = true;
};
# Undo nixpkgs' cap_sys_nice wrapper — it leaks into every child
# process (terminal, rofi, everything), breaking bwrap-sandboxed
# apps like Steam. We don't use RT scheduling anyway (see below).
security.wrappers.Hyprland = lib.mkForce {
owner = "root";
group = "root";
source = lib.getExe config.programs.hyprland.package;
capabilities = "";
};
environment.sessionVariables = {
MOZ_ENABLE_WAYLAND = "1";
NIXOS_OZONE_WL = "1";
HYPRLAND_NO_RT = "1";
};
}
+16
View File
@@ -0,0 +1,16 @@
{ config, pkgs, ... }:
{
security.rtkit.enable = true;
# PipeWire configuration
services.pipewire = {
enable = true;
alsa.enable = true;
alsa.support32Bit = true;
pulse.enable = true;
jack.enable = true;
# WirePlumber configuration
wireplumber.enable = true;
};
}
+8
View File
@@ -0,0 +1,8 @@
{ pkgs, ... }:
{
users.users.metallaxis = {
isNormalUser = true;
extraGroups = [ "wheel" "networkmanager" "libvirtd" "docker" "kvm" "audio" ];
};
}
+84
View File
@@ -0,0 +1,84 @@
{ config, pkgs, ... }:
{
sops.secrets.wireguard_home = {
sopsFile = ../secrets/wireguard.yaml;
key = "wireguard_home_conf";
path = "/run/secrets/Home.conf";
restartUnits = [ "wireguard-home.service" ];
};
systemd.services.wireguard-home = {
description = "Import Home WireGuard connection into NetworkManager";
wantedBy = [ "multi-user.target" ];
after = [
"NetworkManager.service"
"sops-nix.service"
];
wants = [
"NetworkManager.service"
"sops-nix.service"
];
serviceConfig = {
Type = "oneshot";
RemainAfterExit = true;
};
script = ''
set -euo pipefail
new_hash=$(
${pkgs.coreutils}/bin/sha256sum /run/secrets/Home.conf |
${pkgs.coreutils}/bin/cut -d' ' -f1
)
old_hash=$(
${pkgs.coreutils}/bin/cat /var/lib/wireguard-home/hash 2>/dev/null || true
)
if [ "$new_hash" = "$old_hash" ]; then
echo "Home WireGuard configuration unchanged."
exit 0
fi
echo "Home WireGuard configuration changed; updating NetworkManager..."
# Remember whether Home was active before replacing it.
if ${pkgs.networkmanager}/bin/nmcli -t -f NAME,ACTIVE connection show \
| ${pkgs.gnugrep}/bin/grep -q '^Home:yes$'; then
home_was_active=true
else
home_was_active=false
fi
${pkgs.networkmanager}/bin/nmcli connection delete Home || true
${pkgs.networkmanager}/bin/nmcli connection import \
type wireguard \
file /run/secrets/Home.conf
# Make it not autoconnect on reboot
${pkgs.networkmanager}/bin/nmcli connection modify Home connection.autoconnect no
# Only re-enable it if it was active before the update.
if [ "$home_was_active" = true ]; then
${pkgs.networkmanager}/bin/nmcli connection up Home
else
${pkgs.networkmanager}/bin/nmcli connection down Home
echo "Home was not active; disabling just to be sure."
fi
${pkgs.coreutils}/bin/mkdir -p /var/lib/wireguard-home
echo "$new_hash" > /var/lib/wireguard-home/hash
'';
};
systemd.tmpfiles.rules = [
"d /var/lib/wireguard-home 0755 root root -"
];
}