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

+7
View File
@@ -0,0 +1,7 @@
# Editor files
.vscode/
*.swp
# Environment files
hardware-configuration.nix
.env
+14
View File
@@ -0,0 +1,14 @@
keys:
- &machine age18lxd6xuk9kafcj59grv63tw94a6h5c87f3sav2v3ymagpqxqju6szw4rcj
- &metallaxis age1alp5ndk3l6luz2k2330rckg52h4gnyfz8qn8yq7902fr3fm8yugs37hm9k
creation_rules:
- path_regex: secrets/ssh\.yaml$
key_groups:
- age:
- *metallaxis
- path_regex: secrets/wireguard\.yaml$
key_groups:
- age:
- *machine
+54
View File
@@ -0,0 +1,54 @@
{ config, lib, pkgs, ... }:
{
imports = [
./modules/display.nix
./modules/sound.nix
./modules/hyprland.nix
./modules/global-packages.nix
./modules/gc.nix
./modules/users.nix
./modules/wireguard.nix
./modules/fonts.nix
./hardware-configuration.nix
];
# Bootloader
boot.loader = {
systemd-boot.enable = true;
efi.canTouchEfiVariables = true;
};
# Network Setup
networking.hostName = "yoga";
networking.networkmanager.enable = true;
time.timeZone = "Europe/Athens";
# Enable Virtualization Daemon
#virtualisation.libvirtd.enable = true;
#virtualisation.docker.enable = true;
# Enable Dev Documentation
documentation.dev.enable = true;
# Graphics
hardware.graphics = {
enable = true;
enable32Bit = true;
extraPackages = with pkgs; [
mesa
];
};
# Set sops-age key file path
sops.age.keyFile = "/var/lib/sops-nix/key.txt";
# Disable the systemd service for the lenovo yoga's keyboard lighting because it does not work
systemd.services."systemd-backlight@leds:platform::kbd_backlight".enable = false;
# Enable flakes and nix commands
nix.settings.experimental-features = [ "nix-command" "flakes" ];
system.stateVersion = "26.05";
}
Generated
+106
View File
@@ -0,0 +1,106 @@
{
"nodes": {
"firefox-addons": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"dir": "pkgs/firefox-addons",
"lastModified": 1791518578,
"narHash": "sha256-wPE66J6tYQHoa5DOB4lg+aVTJTdEQnc7SoSjwkGaZUY=",
"owner": "rycee",
"repo": "nur-expressions",
"rev": "55c1d7ee569523b8bde22ee765b6157670787e4c",
"type": "gitlab"
},
"original": {
"dir": "pkgs/firefox-addons",
"owner": "rycee",
"repo": "nur-expressions",
"type": "gitlab"
}
},
"home-manager": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1790215976,
"narHash": "sha256-VkR1rMGyjU9jtw8ISFx5uqR9e+LEaOlhHwrseFkiIVk=",
"owner": "nix-community",
"repo": "home-manager",
"rev": "a6631107a83ceab5872f298a2ea710859c80c4cb",
"type": "github"
},
"original": {
"owner": "nix-community",
"ref": "release-26.05",
"repo": "home-manager",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1790340521,
"narHash": "sha256-7CLWYUrZU7w6X7y3VBohp2TUhQb0CjiEUbPE6WaOdK4=",
"rev": "f5c082a40f7571c266e74e80ae2e68aadd8a9fc7",
"type": "tarball",
"url": "https://releases.nixos.org/nixos/26.05/nixos-26.05.10620.f5c082a40f75/nixexprs.tar.zst"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-26.05",
"type": "indirect"
}
},
"nixpkgs-unstable": {
"locked": {
"lastModified": 1790323409,
"narHash": "sha256-m4DGo58Fza5ImOegtWOeE18nhpSO1IGzsVA6Lpsb4zw=",
"rev": "e94cb152ed51bd6e24eb4a41f1460252beb52cd2",
"type": "tarball",
"url": "https://releases.nixos.org/nixos/unstable/nixos-26.11pre1079315.e94cb152ed51/nixexprs.tar.zst"
},
"original": {
"id": "nixpkgs",
"ref": "nixos-unstable",
"type": "indirect"
}
},
"root": {
"inputs": {
"firefox-addons": "firefox-addons",
"home-manager": "home-manager",
"nixpkgs": "nixpkgs",
"nixpkgs-unstable": "nixpkgs-unstable",
"sops-nix": "sops-nix"
}
},
"sops-nix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1790498116,
"narHash": "sha256-rs9meAYxW3zzrh43yaW7htrqCD+X9+pupDPHN86fumI=",
"owner": "Mic92",
"repo": "sops-nix",
"rev": "5efb5a6f4f5ab192817d28557dd4d650fa14d866",
"type": "github"
},
"original": {
"owner": "Mic92",
"repo": "sops-nix",
"type": "github"
}
}
},
"root": "root",
"version": 7
}
+101
View File
@@ -0,0 +1,101 @@
{
description = "NixOS Configuration";
inputs = {
# Nixpkgs
nixpkgs.url = "nixpkgs/nixos-26.05";
nixpkgs-unstable.url = "nixpkgs/nixos-unstable";
# Nix Sops
sops-nix = {
url = "github:Mic92/sops-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
# Home Manager
home-manager = {
url = "github:nix-community/home-manager/release-26.05";
inputs.nixpkgs.follows = "nixpkgs";
};
# Firefox Addons
firefox-addons = {
url = "gitlab:rycee/nur-expressions?dir=pkgs/firefox-addons";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = inputs@{ nixpkgs, nixpkgs-unstable, home-manager, sops-nix, ...}:
let
system = "x86_64-linux";
in {
nixosConfigurations.yoga = nixpkgs.lib.nixosSystem {
specialArgs = { inherit inputs; };
modules = [
./configuration.nix
({ pkgs, ... }: {
nixpkgs.overlays = [
# Unstable overlay
(final: prev: {
unstable = import nixpkgs-unstable {
system = prev.stdenv.hostPlatform.system;
config = prev.config;
};
})
];
})
sops-nix.nixosModules.sops
home-manager.nixosModules.home-manager {
home-manager = {
useGlobalPkgs = true;
useUserPackages = true;
extraSpecialArgs = { inherit inputs; };
sharedModules = [
sops-nix.homeManagerModules.sops
];
users.root = import ./root/home.nix;
users.metallaxis = import ./metallaxis/home.nix;
backupFileExtension = "backup";
};
}
];
};
devShells.${system}= {
dev =
let
pkgs = import nixpkgs {
inherit system;
config.allowUnfreePredicate = pkg: true;
};
in
import ./modules/dev.nix {
inherit pkgs system;
};
dev-static =
let
pkgs = import nixpkgs {
inherit system;
config.allowUnfreePredicate = pkg: true;
};
in
import ./modules/dev-static.nix {
inherit pkgs system;
};
hack =
let
pkgs = import nixpkgs {
inherit system;
};
in
import ./modules/hack.nix {
inherit pkgs system;
};
};
};
}
+25
View File
@@ -0,0 +1,25 @@
{config, pkgs, ...}:
{
imports = [
./modules/bash.nix
./modules/ssh.nix
./modules/gpg.nix
./modules/git.nix
./modules/firefox.nix
./modules/vscode.nix
];
home.username = "metallaxis";
home.homeDirectory = "/home/metallaxis";
home.stateVersion = "26.05";
# Set the default shell for the user
home.sessionVariables = {
EDITOR = "vim";
VISUAL = "vim";
};
# Set sops-age key file path
sops.age.keyFile = "${config.home.homeDirectory}/.config/sops/age/keys.txt";
}
+87
View File
@@ -0,0 +1,87 @@
{ config, pkgs, ... }:
{
programs.bash = {
enable = true;
shellAliases = {
ff = "fastfetch";
ls = "lsd";
ll = "lsd -lFa";
# OS Rebuilding
nrs = "sudo nixos-rebuild switch --flake ${config.home.homeDirectory}/.dotfiles#yoga";
# Dev Shells
dev="nix develop ${config.home.homeDirectory}/.dotfiles#dev";
dev-static="nix develop ${config.home.homeDirectory}/.dotfiles#dev-static";
hack="nix develop ${config.home.homeDirectory}/.dotfiles#hack";
};
initExtra = ''
cp-dotfiles () {
case "$1" in
usb)
sudo rsync -av --prune-empty-dirs --no-owner --no-group \
--exclude='hardware-configuration.nix' \
${config.home.homeDirectory}/.dotfiles/* "/mnt/usb/os/linux/nixos/dotfiles/"
;;
microsd)
sudo rsync -av --prune-empty-dirs --no-owner --no-group \
--exclude='hardware-configuration.nix' \
${config.home.homeDirectory}/.dotfiles/* "/mnt/microsd/os/linux/nixos/dotfiles/"
;;
nvme)
sudo rsync -av --prune-empty-dirs --no-owner --no-group \
--exclude='hardware-configuration.nix' \
${config.home.homeDirectory}/.dotfiles/* "/mnt/nvme/home/metallaxis/Desktop/microsd backup/os/linux/nixos/dotfiles/"
;;
*)
echo "Usage: cp-dotfiles [usb|microsd|nvme]"
;;
esac
}
git_full_status() {
local branch ahead behind dirty
branch=$(git rev-parse --abbrev-ref HEAD 2>/dev/null)
if [[ -n "$branch" ]]; then
# Check for uncommitted changes
if ! git diff --no-ext-diff --quiet --exit-code 2>/dev/null; then
dirty="●"
fi
# Get upstream info
local upstream
upstream=$(git rev-parse --abbrev-ref "@{upstream}" 2>/dev/null)
if [[ -n "$upstream" ]]; then
ahead=$(git rev-list --count "$upstream..HEAD" 2>/dev/null)
behind=$(git rev-list --count "HEAD..$upstream" 2>/dev/null)
fi
local status=" ($branch"
[[ -n "$dirty" ]] && status+="$dirty"
[[ $ahead -gt 0 ]] && status+=" ↑$ahead"
[[ $behind -gt 0 ]] && status+=" ↓$behind"
status+=")"
echo "$status"
fi
}
__prompt_command() {
local EXIT=$?
local TIME=$(date +%H:%M)
local git_status=$(git_full_status)
if [ $EXIT -eq 0 ]; then
PS1="\[\033[0;90m\][$TIME]\[\033[0m\] \[\033[1;32m\]\u@\h\[\033[0m\]:\[\033[1;34m\]\w\[\033[1;33m\]$git_status\[\033[0m\] \$ "
else
PS1="\[\033[0;90m\][$TIME]\[\033[0m\] \[\033[1;32m\]\u@\h\[\033[0m\]:\[\033[1;34m\]\w\[\033[1;33m\]$git_status \[\033[1;31m\][ERR:$EXIT]\[\033[0m\] \$ "
fi
}
PROMPT_COMMAND=__prompt_command
'';
};
}
+337
View File
@@ -0,0 +1,337 @@
{ config, pkgs, lib, inputs, ... }:
{
programs.firefox = {
enable = true;
# Default profile settings
profiles.default = {
path = "default";
id = 0;
isDefault = true;
settings = {
## Passwords/Autofill ##
# Saving passwords
"signon.rememberSignons" = false;
# Autofill for forms
"signon.autofillForms" = false;
# Generation of strong passwords
"signon.generation.enabled" = false;
# Autofill for addresses and credit cards
"extensions.formautofill.addresses.enabled" = true;
"extensions.formautofill.creditCards.enabled" = false;
########################
## Behaviour ##
# Check whether File is the default browser on startup
"browser.shell.checkDefaultBrowser" = false;
# Closing the last tab should not close the window
"browser.tabs.closeWindowWithLastTab" = false;
# Warn when quitting Firefox with Ctrl+Q
"browser.warnOnQuitShortcut" = true;
# about:config warning
"browser.aboutConfig.showWarning" = false;
# Picture-in-Picture
"media.videocontrols.picture-in-picture.enabled" = false;
###############
## Dark mode ##
"layout.css.prefers-color-scheme.content-override" = 0;
"browser.theme.toolbar-theme" = 0;
"browser.theme.content-theme" = 0;
"extensions.activeThemeID" = "firefox-compact-dark@mozilla.org";
###############
## Startup/Homepage ##
# Open home page on startup
"browser.startup.page" = 1;
# Set the homepage to Metallaxis Search
"browser.startup.homepage" = "https://search.metallaxis.net";
######################
## New Tab ##
# Search box on new tab page
"browser.newtabpage.activity-stream.showSearch" = true;
# Show tops sites
"browser.newtabpage.activity-stream.feeds.topsites" = false;
# Show highlights
"browser.newtabpage.activity-stream.feeds.section.highlights" = false;
# Show top stories
"browser.newtabpage.activity-stream.feeds.section.topstories" = false;
# Show sponsored top sites on new tab page
"browser.newtabpage.activity-stream.feeds.system.topstories" = false;
# Show sponsored content on new tab page
"browser.newtabpage.activity-stream.showSponsored" = false;
# Show sponsored top sites on new tab page
"browser.newtabpage.activity-stream.showSponsoredTopSites" = false;
# Show sponsored content in the activity stream
"browser.newtabpage.activity-stream.system.showSponsored" = false;
# Show snippets on new tab page
"browser.newtabpage.activity-stream.feeds.snippets" = false;
#############
## Bookmarks ##
# Visibility of the bookmarks toolbar
"browser.toolbars.bookmarks.visibility" = "never";
###############
## Downloads ##
# Automatic downloads to the default download directory
"browser.download.useDownloadDir" = false;
# Set the default download directory to the Downloads folder
"browser.download.dir" = "${config.home.homeDirectory}/Downloads";
###############
## Privacy ##
# HTTPS-Only mode
"dom.security.https_only_mode" = true;
# DNS over HTTPS
"network.trr.mode" = 3;
"network.trr.uri" = "https://base.dns.mullvad.net/dns-query";
"network.trr.excluded-domains" = "localhost,0.0.0.0,nexus.local.metallaxis.net";
# Disable Firefox's discovery features
"browser.discovery.enabled" = false;
# Disable Pocket integration
"extensions.pocket.enabled" = false;
# Don't sell my data header
"privacy.globalprivacycontrol.enabled" = true;
# Referer trimming policy for cross-origin requests
"network.http.referer.XOriginTrimmingPolicy" = 2;
# Automatically send crash reports to Mozilla
"browser.crashReports.unsubmittedCheck.autoSubmit2" = false;
#############
## Address Bar ##
# Complete address bar
"browser.uiCustomization.state" = builtins.toJSON {
placements = {
widget-overflow-fixed-list = [ ];
unified-extensions-area = [ ];
nav-bar = [
"back-button"
"forward-button"
"home-button"
"stop-reload-button"
"customizableui-special-spring1"
"vertical-spacer"
"urlbar-container"
"customizableui-special-spring2"
"history-panelmenu"
"downloads-button"
"_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action" # Bitwarden
"ublock0_raymondhill_net-browser-action" # uBlock Origin
"unified-extensions-button"
];
toolbar-menubar = [ "menubar-items" ];
TabsToolbar = [
"tabbrowser-tabs"
"new-tab-button"
"customizableui-special-spring3"
"alltabs-button"
];
vertical-tabs = [ ];
PersonalToolbar = [ "personal-bookmarks" ];
};
seen = [
"developer-button"
"screenshot-button"
"ublock0_raymondhill_net-browser-action"
"_446900e4-71c2-419f-a6a7-df9c091e268b_-browser-action"
];
dirtyAreaCache = [
"nav-bar" "TabsToolbar" "vertical-tabs"
"unified-extensions-area" "toolbar-menubar" "PersonalToolbar"
];
currentVersion = 26;
newElementCount = 6;
};
# Search engine suggestions and autocomplete in the address bar
"browser.search.suggest.enabled" = true;
# Dropdown suggestions for search engines and more in the address bar
"browser.urlbar.suggest.searches" = true;
# Inline calculator in the address bar
"browser.urlbar.suggest.calculator" = true;
# Inline unit conversion in the address bar
"browser.urlbar.unitConversion.enabled" = true;
# Bookmarks suggestions in the address bar
"browser.urlbar.suggest.bookmark" = true;
# Already open tab suggestions in the address bar
"browser.urlbar.suggest.openpage" = false;
# History suggestions in the address bar
"browser.urlbar.suggest.recentsearches" = false;
"browser.urlbar.suggest.history" = false;
# Frequently visited sites suggestions in the address bar
"browser.urlbar.suggest.topsites" = false;
# Suggestions for using other search engines in the address bar
"browser.urlbar.suggest.engines" = false;
# Popular sites and trending searches suggestions in the address bar
"browser.urlbar.suggest.trending" = false;
# Suggestions for sponsored content in the address bar
"browser.urlbar.suggest.quicksuggest.nonsponsored" = false;
"browser.urlbar.suggest.quicksuggest.sponsored" = false;
#################
};
# Extensions
extensions = {
force = true;
packages = with inputs.firefox-addons.packages.${pkgs.stdenv.hostPlatform.system}; [
bitwarden
ublock-origin
];
};
# Search engine settings
search = {
force = true;
default = "metallaxis";
privateDefault = "metallaxis";
engines = {
# Disable default search engines
ddg.metaData.hidden = true;
bing.metaData.hidden = true;
ebay.metaData.hidden = true;
amazondotcom.metaData.hidden = true;
wikipedia.metaData.hidden = true;
perplexity.metaData.hidden = true;
# Metallaxis search engine
metallaxis = {
name = "Metallaxis Search";
urls = [
{
template = "https://search.metallaxis.net/search";
params = [ { name = "q"; value = "{searchTerms}"; } ];
}
{
template = "https://search.metallaxis.net/autocompleter";
params = [ { name = "q"; value = "{searchTerms}"; } ];
type = "application/x-suggestions+json";
}
];
icon = "https://search.metallaxis.net/favicon.ico";
definedAliases = [ "@m" "@met" ];
};
# Nix packages search
nix-pkgs = {
name = "Nix Packages";
urls = [
{
template = "https://search.nixos.org/packages";
params = [ { name = "query"; value = "{searchTerms}"; } ];
}
];
icon = "https://search.nixos.org/favicon.ico";
definedAliases = [ "@npkgs" ];
};
# Nix settings search
noogle = {
name = "Noogle";
urls = [
{
template = "https://noogle.dev/q";
params = [ { name = "term"; value = "{searchTerms}"; } ];
}
];
icon = "https://noogle.dev/favicon.ico";
definedAliases = [ "@noogle" "@ngl" ];
};
# Youtube search
youtube = {
name = "YouTube";
urls = [
{
template = "https://www.youtube.com/results";
params = [ { name = "search_query"; value = "{searchTerms}"; } ];
}
];
icon = "https://www.youtube.com/favicon.ico";
definedAliases = [ "@youtube" "@yt" ];
};
# Github search
github = {
name = "GitHub";
urls = [
{
template = "https://github.com/search";
params = [ { name = "q"; value = "{searchTerms}"; } ];
}
];
icon = "https://github.com/favicon.ico";
definedAliases = [ "@github" "@gh" ];
};
# Google search
google = {
name = "Google";
urls = [
{
template = "https://www.google.com/search";
params = [ { name = "q"; value = "{searchTerms}"; } ];
}
{
template = "https://www.google.com/complete/search";
params = [ { name = "q"; value = "{searchTerms}"; } ];
type = "application/x-suggestions+json";
}
];
icon = "https://www.google.com/favicon.ico";
definedAliases = [ "@google" "@g" ];
};
};
};
};
policies = {
# Firefox Settingss
NoDefaultBookmarks = true;
DisableAccounts = true;
DisableForgetButton = true;
DisableProfileImport = true;
DisableProfileRefresh = true;
DisableSetDesktopBackground = true;
DisableFeedbackCommands = true;
# Sanitization on shutdown
SanitizeOnShutdown = {
Cache = true;
Downloads = true;
FormData = true;
Cookies = false;
History = false;
Sessions = false;
SiteSettings = false;
OfflineApps = false;
};
# Terms of Use
SkipTermsOfUse = true;
# Telemetry and data collection
DisableTelemetry = true;
DisableFirefoxStudies = true;
};
};
}
+38
View File
@@ -0,0 +1,38 @@
{ config, pkgs, ... }:
{
programs.git = {
enable = true;
settings = {
user = {
name = "George Chatzopoulos";
email = "george@metallaxis.net";
signingkey = "CBB1EC56A00B20E4FBCF5A33D0A7F9DA00A92C55";
};
core = {
editor = "vim";
excludesfile = "${config.home.homeDirectory}/.gitignore_global";
};
gpg.format = "openpgp";
commit.gpgsign = true;
tag.gpgsign = true;
};
};
home.file.".gitignore_global".text = ''
# Editor files
*.swp
# Environment files
.env
# Build/Test files
obj/
build/
bin/
test/
'';
}
+13
View File
@@ -0,0 +1,13 @@
{ config, pkgs, ... }:
{
programs.gpg = {
enable = true;
};
services.gpg-agent = {
enable = true;
enableSshSupport = false;
pinentry.package = pkgs.pinentry-gnome3;
};
}
+11
View File
@@ -0,0 +1,11 @@
{ pkgs, ... }:
{
programs.vscode = {
enable = true;
profiles.default.userSettings = {
"makefile.configureOnOpen" = true;
};
};
}
+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 -"
];
}
+17
View File
@@ -0,0 +1,17 @@
{config, pkgs, ...}:
{
imports = [
./modules/bash.nix
];
home.username = "root";
home.homeDirectory = "/root";
home.stateVersion = "26.05";
# Set the default shell for the user
home.sessionVariables = {
EDITOR = "vim";
VISUAL = "vim";
};
}
+73
View File
@@ -0,0 +1,73 @@
{ pkgs, ... }:
{
programs.bash = {
enable = true;
shellAliases = {
ff = "fastfetch";
ls = "lsd";
ll = "lsd -lFa";
};
initExtra = ''
mount-device () {
case "$1" in
usb)
sudo mount -m /dev/sda1 /mnt/usb
;;
microsd)
sudo mount -m /dev/mmcblk0p1 /mnt/microsd
;;
nvme)
sudo mount -m /dev/sda2 /mnt/nvme
;;
*)
echo "Usage: mount-device [usb|microsd|nvme]"
;;
esac
}
git_full_status() {
local branch ahead behind dirty
branch=$(git rev-parse --abbrev-ref HEAD 2>/dev/null)
if [[ -n "$branch" ]]; then
# Check for uncommitted changes
if ! git diff --no-ext-diff --quiet --exit-code 2>/dev/null; then
dirty="●"
fi
# Get upstream info
local upstream
upstream=$(git rev-parse --abbrev-ref "@{upstream}" 2>/dev/null)
if [[ -n "$upstream" ]]; then
ahead=$(git rev-list --count "$upstream..HEAD" 2>/dev/null)
behind=$(git rev-list --count "HEAD..$upstream" 2>/dev/null)
fi
local status=" ($branch"
[[ -n "$dirty" ]] && status+="$dirty"
[[ $ahead -gt 0 ]] && status+=" ↑$ahead"
[[ $behind -gt 0 ]] && status+=" ↓$behind"
status+=")"
echo "$status"
fi
}
__prompt_command() {
local EXIT=$?
local TIME=$(date +%H:%M)
local git_status=$(git_full_status)
if [ $EXIT -eq 0 ]; then
PS1="\[\033[0;90m\][$TIME]\[\033[0m\] \[\033[1;31m\]\u@\h\[\033[0m\]:\[\033[1;34m\]\w\[\033[1;33m\]$git_status\[\033[0m\] # "
else
PS1="\[\033[0;90m\][$TIME]\[\033[0m\] \[\033[1;31m\]\u@\h\[\033[0m\]:\[\033[1;34m\]\w\[\033[1;33m\]$git_status \[\033[1;31m\][ERR:$EXIT]\[\033[0m\] # "
fi
}
PROMPT_COMMAND=__prompt_command
'';
};
}
+18
View File
@@ -0,0 +1,18 @@
servers_key: ENC[AES256_GCM,data:1TneJVFsQnsYz24y7Kmmw1oc8FLXH+1FvLu1CfqJZ5yLPm/38ng+KmyAV+R0gU8SDux9ee/uhb7DH2+7nlZhOBmUWBC6AbJv02Z90OntjYyi4O7v2nV6VcfjNaLDd20vHEoGawg6z4sQ6FugaaoLwZcA72GsK5LMfgOoVPBdY92GqsVLqD2aOhMFQ7ae4AMeID8wtFPPX3vioPko+vm0brm3JF2kAWdvWtBU2tzgOH4xjtsf5KZU4NjjjXwRjf1WUIphA8sT0jjXMNKcUcXV1iEK/TnZupgsdMxy7+z72FLVJRaLe5XuJrR/q7RUnA746mByvFT3D26kfh8r2UkuquWglfDdHMW/XgtNbu+V4JjSwuvTm96VTU4IGT6R4K+rQ9YGY0b7OcD/x/hmCT8K3ydDm8RhQZ1OxK/XcOIBZRIHlEy5GIQ3t7IoGkslsgYK0QUMXOSpCFc51uWMbbTOvDQ1LUZ9kiiHHzpkjkq4hzUvg6I+DQYBwdcfhN2owztHQe8VnVQNs+zZnNZtDlb/ePr3eJsdtQUkbpHU,iv:jSONySkh0s/yT3G8mo+8OG2YDcTyRYn1aG747nbR7vQ=,tag:bbla0werXKqeWJL6roTL8g==,type:str]
gitea_key: ENC[AES256_GCM,data:HnIYts9u66yxyo0vXvl4VUf0Xx4JyzeZlgeA7EfTNWderulMMtaTAR0nL78kauNxSqOLCuYrrYQe0nkz/HgrnLtBbycePTPYKCE+orGqECLY3kfwwtfx9XIOSZWnyWxcmz7WTB4cR8UTV22vbEq94Kemc2uB9sqyHwYKMCpCK8FKTEwpe4JjRtCjJn97mtGBU7HGKYhglZxkz/0r1RYJoGZwmgy6P2Uy9dR4dTr8rN8OKt7EEp6f38epKkDY+dqptvNdPelTH3GRJuV9rD8OpxcwbJObb6EBzV46OsZlGwB0J0fWKPj0ToNf1tlDz5bPqK3kc5TrRjHcyXv136cBKZnEU9URjUuZRlHars5QhVTS637MeOTO3qiWq93Q8Zf6W0lXYt+F2AztyZYeVjdtKtKVCyS5hybp9QmP5WFF5kaMsKCIecYiotTWoDAilGY3u9vOHqAdR4N7vM2bzs9Xy64cG6aBQ5T2RWuMmcyL+yWLpW7/3pL8eqWLaU6iOqaRETPf1vgC+AkTIbQbOn9lzpc6r0nWb3eKWcfB,iv:7dX/ltvDAXvL6FWVaR3k3eT2kBTX3gnggjfMhF/nSRI=,tag:RMwe3wXp4zvGDTKdeq38aw==,type:str]
github_key: ENC[AES256_GCM,data:pm4HR08Lu1OJILs9uL2kiOMbLjHGtGGlXTPILEUHkfdgyY7wllQUss6lA/sXA13EaE4F7BQuU8NnClnjSUVRkUziwVByN8qQqSnIMUizLJuzc02qqKMH4u+HgoBdgAB7KUL9yZEEBgsDr1ld77eoSRVSvcnZCd/Rxg6KGSq49t8mHiCB/0ntlVLrgYv/FPSPDKlzONh7WtCNoNHHmmfq2B9hkR/BnKUsd5bxKxGLHf13VNctLdi00MH8DEW8873zv2YL5ag0UZMOOwDTLq6/Eb7s2BhRu41ZlPumKlAs/EJDWFFCvTdkf3FaxpBcsjO1FKscdsLCcK8c1t9eUjv7ICBJnShRMnVtBHjS63ILRdBZALdEwrZ+HYjxXj4U/IY4Lo6dI5se77TFMaI0ZEy2MgmvkMv/WtNIZv/xwtorYQeF8OdphB2xP0B2JMedUdH46zFEPkxCy/1AM8wlClPVBEzijU08iFUZtl+34KM4/8zQqdvECyOiSNupdGN83O/dqKwQInhRTnw4CGODq3Ekx+M21gIxJnupCDrH,iv:KWA6S9BNyj66H772La5Z/T/yzbmI7uLaf7rer+t9ZfY=,tag:7hrMp6eATg83yorvXpc3tg==,type:str]
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSB0MTUvd2JzQUxOa3hLYUpJ
SURFQTFKOHRRWisrcWhpRDFvenF4Z08rWUNNClBheUdJb0xJbHB0T1AzODVKUW1H
RFRxMVFzUVIzbTdJWkVtRHZnZFV0aFkKLS0tIEtKQXg3LzlMNm1RdktBMTZ6VWxJ
cGJUMnB6dTRReXh3bHpwUXFNS3RVajQKdqsEacVruaFwP6iLS4N/cnC8dHy1v3lH
5QlF18mn4D9UvLTVgWPqvSoFGoLArPaCKFFUR7Eqxg3ZXphTuEOe2w==
-----END AGE ENCRYPTED FILE-----
recipient: age1alp5ndk3l6luz2k2330rckg52h4gnyfz8qn8yq7902fr3fm8yugs37hm9k
lastmodified: "2026-10-03T20:13:47Z"
mac: ENC[AES256_GCM,data:uaHHUqzSZ+HZrK28KVoMBglqxuDkQx8PVMXxJhAoaKw38A08yvEg3vA0+qGTsdGjGuaIvmSxY/gbTRdqFHwG7WT4zjokQgMlU7hqBZrAW4DX2WaxTyVtEdIdn28fdn4F0oqnL/8FHwlctW+dz8HTK7PKYBAZ9Ql6XbVHUVlwv8o=,iv:Zv5HN/YM79jgTOVHBKkh3QWDaBswCz6bWUlElnw3Dh0=,tag:NvdRZulvK5CrMCZnqLkFbw==,type:str]
unencrypted_suffix: _unencrypted
version: 3.13.3
+1
View File
@@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILT30sjMJgpadblCnVnbN2B3Dw3f5B/V1o1E1BDcb3+Z metallaxis@yoga
+1
View File
@@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGdMVJ/DCjTrDZ9hVnf54fodt5kPmjW+HVO+rQ9TR4TR metallaxis@yoga
+1
View File
@@ -0,0 +1 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILuH0jraVSH6S9Kihc7T3/qEsaMLsTLfN4xuppUT2NTj metallaxis@yoga
+16
View File
@@ -0,0 +1,16 @@
wireguard_home_conf: ENC[AES256_GCM,data:oNVIAlrPvXkq15MY8oNrpkBAp6rynlD++xGyTs2z7VPG/nBOcd+b7BbhtFXXH1GcyKAD9cJNLrjNc2y1ve8zH+trYj9iENp9Iivd2FBrS9fXmN5DzE9ePMCXKRFKJJ5lyThHunB3ZCTWZIguh2fyHMlveP9Zv0tLR4eY5sXsJ4I7zIhYZw74OlEp4uV9qhKUpT4PN3RRdR4AmWWhICttAj6/8nAK23ewPY8lVdoO30rZ2Earg+WOd2xdo/i+eOltBLo4RqGsnRMf8RxcuXNnYRBj7BgQm046QkjsG+fexXKSA3UIChK6o4RlqfUtyNytOtr9esFzPCZ8dOANsXxtY7+522FR7xaNDLPY58SdMkM1lpG2o6neq9fffFWSprbzMvLCOdCVTP1m/HfWZXyPNgw+yoPQ,iv:kc76M/dnMhV3bN1UQQOjmOrkNNx4jDy/Hh5NoJSQYDk=,tag:SOiP5fWna//wZcO9c6lr6Q==,type:str]
sops:
age:
- enc: |
-----BEGIN AGE ENCRYPTED FILE-----
YWdlLWVuY3J5cHRpb24ub3JnL3YxCi0+IFgyNTUxOSA0ZW1ZMUpKVkMvMVhzMzVH
Q04xditLME9NcTdwdzFGRkVhWDNUUE9wcWlFCjAyL0JLL25VODl6M0RvdHFOYmRw
VlBtNTJuY1N4UEEvT0dBNnFQcVNMQ2MKLS0tIE9OZjQxMm1oT3JqSVVUV3hoWUw2
Wmc1WS9YblFQcnd3cTU0dTY4UWhpRW8K3VGg8+gAt+eF9f/dxwOi9xmEDeyGIDDv
xhcDSc2trDWsEV8Oh6ZjIb65dpj5M9PDKCFqOlsaMErJLfE6xXqgtA==
-----END AGE ENCRYPTED FILE-----
recipient: age18lxd6xuk9kafcj59grv63tw94a6h5c87f3sav2v3ymagpqxqju6szw4rcj
lastmodified: "2026-10-03T20:15:11Z"
mac: ENC[AES256_GCM,data:ISf105Vp+yQpPGKqWn9V01oWHbmMCC4VDYji5GE5Y1QBPjT2NflQMSNi3/o+nNMr1dKuzIQmRJFdxp76AUdlJ42Z6t2Tg5019O0fo5I0xtjnbD0bNlUC+knLsFz7+eAF1oP2sjCCDzdPTD9j4WMJvvkHrER1xmnS5F30nZabWLs=,iv:VFqQgeJIWnknFCycjS6or1LRM8wzK7d/FszzPm3JWdE=,tag:65Cf0eVw8eMmHLkbmCAA6w==,type:str]
unencrypted_suffix: _unencrypted
version: 3.13.3