From 386c768e2bd8d75f33924c299283b759e6481e2e Mon Sep 17 00:00:00 2001 From: Kris Yotam <75515498+krisyotam@users.noreply.github.com> Date: Fri, 15 May 2026 15:28:17 -0500 Subject: [PATCH] restructure: standard/system split, rename ksd- to sd-, add wired pentesting config - Split into standard/ (distro-based) and system/ (machine-specific) - Rename all ksd- prefixes to sd- - Add sd-wired: full Artix OpenRC pentesting deploy with BlackArch, mksh, plan9port - Add sd-moirai, sd-motoko, sd-eva01 scaffolding - Update all URLs from GitHub to sr.ht - Update README, compile-all-pdfs.sh for new structure --- README.md | 35 ++- compile-all-pdfs.sh | 4 +- ksd-kali/deploy.sh | 4 - ksd-kali/manual.tex | 26 -- ksd-ubuntu/deploy.sh | 4 - ksd-ubuntu/manual.tex | 26 -- {ksd-artix => standard/sd-artix}/deploy.sh | 6 +- {ksd-artix => standard/sd-artix}/dev.csv | 0 {ksd-artix => standard/sd-artix}/manual.pdf | Bin {ksd-artix => standard/sd-artix}/manual.tex | 0 {ksd-artix => standard/sd-artix}/notes.csv | 0 .../sd-artix}/post-install.sh | 0 {ksd-artix => standard/sd-artix}/progs.csv | 0 {ksd-gentoo => standard/sd-gentoo}/deploy.sh | 0 {ksd-gentoo => standard/sd-gentoo}/manual.tex | 0 standard/sd-kali/deploy.sh | 4 + standard/sd-kali/manual.tex | 0 {ksd-macos => standard/sd-macos}/deploy.sh | 0 {ksd-macos => standard/sd-macos}/manual.tex | 0 standard/sd-ubuntu/deploy.sh | 4 + standard/sd-ubuntu/manual.tex | 0 {ksd-win11 => standard/sd-win11}/deploy.sh | 0 {ksd-win11 => standard/sd-win11}/manual.tex | 0 system/sd-eva01/deploy.sh | 0 system/sd-eva01/manual.tex | 0 system/sd-eva01/progs.csv | 0 system/sd-moirai/deploy.sh | 0 system/sd-moirai/manual.tex | 0 system/sd-moirai/progs.csv | 0 system/sd-motoko/deploy.sh | 0 system/sd-motoko/manual.tex | 0 system/sd-motoko/progs.csv | 0 system/sd-wired/deploy.sh | 297 ++++++++++++++++++ system/sd-wired/manual.tex | 0 system/sd-wired/progs.csv | 240 ++++++++++++++ 35 files changed, 572 insertions(+), 78 deletions(-) delete mode 100755 ksd-kali/deploy.sh delete mode 100644 ksd-kali/manual.tex delete mode 100755 ksd-ubuntu/deploy.sh delete mode 100644 ksd-ubuntu/manual.tex rename {ksd-artix => standard/sd-artix}/deploy.sh (99%) rename {ksd-artix => standard/sd-artix}/dev.csv (100%) rename {ksd-artix => standard/sd-artix}/manual.pdf (100%) rename {ksd-artix => standard/sd-artix}/manual.tex (100%) rename {ksd-artix => standard/sd-artix}/notes.csv (100%) rename {ksd-artix => standard/sd-artix}/post-install.sh (100%) rename {ksd-artix => standard/sd-artix}/progs.csv (100%) rename {ksd-gentoo => standard/sd-gentoo}/deploy.sh (100%) rename {ksd-gentoo => standard/sd-gentoo}/manual.tex (100%) create mode 100644 standard/sd-kali/deploy.sh create mode 100644 standard/sd-kali/manual.tex rename {ksd-macos => standard/sd-macos}/deploy.sh (100%) rename {ksd-macos => standard/sd-macos}/manual.tex (100%) create mode 100644 standard/sd-ubuntu/deploy.sh create mode 100644 standard/sd-ubuntu/manual.tex rename {ksd-win11 => standard/sd-win11}/deploy.sh (100%) rename {ksd-win11 => standard/sd-win11}/manual.tex (100%) create mode 100644 system/sd-eva01/deploy.sh create mode 100644 system/sd-eva01/manual.tex create mode 100644 system/sd-eva01/progs.csv create mode 100644 system/sd-moirai/deploy.sh create mode 100644 system/sd-moirai/manual.tex create mode 100644 system/sd-moirai/progs.csv create mode 100644 system/sd-motoko/deploy.sh create mode 100644 system/sd-motoko/manual.tex create mode 100644 system/sd-motoko/progs.csv create mode 100644 system/sd-wired/deploy.sh create mode 100644 system/sd-wired/manual.tex create mode 100644 system/sd-wired/progs.csv diff --git a/README.md b/README.md index 914aa6a5ec8840b1ec3e0aa1b0cc8e6c3c07525e..929f7f8b64f6d08cfdcbfb125eddfd6ad448213a 100644 --- a/README.md +++ b/README.md @@ -1,30 +1,39 @@ # sdeploy -Kris's Simple Deploy — OS-specific deployment scripts that install packages and configure a system using [srice](https://github.com/krisyotam/srice) dotfiles. +Kris's Simple Deploy -- OS and system-specific deployment scripts that install packages and configure machines using [srice](https://git.sr.ht/~krisyotam/srice) dotfiles. ## Structure ``` -ksd-arch/ → Arch Linux (primary, fully implemented) -ksd-gentoo/ → Gentoo (planned) -ksd-kali/ → Kali Linux (planned) -ksd-ubuntu/ → Ubuntu/Debian (planned) -ksd-macos/ → macOS (planned) -ksd-win11/ → Windows 11 + WSL (planned) +standard/ Distro-based installs + sd-artix/ Artix Linux (primary, fully implemented) + sd-gentoo/ Gentoo (planned) + sd-kali/ Kali Linux (planned) + sd-ubuntu/ Ubuntu/Debian (planned) + sd-macos/ macOS (planned) + sd-win11/ Windows 11 + WSL (planned) + +system/ Machine-specific configs + sd-wired/ Pentesting laptop (Artix OpenRC + BlackArch) + sd-moirai/ Desktop workstation + sd-motoko/ (planned) + sd-eva01/ (planned) ``` -## Usage (Arch) +## Usage (Wired) ```bash -curl -LO https://raw.githubusercontent.com/krisyotam/sdeploy/main/ksd-arch/deploy.sh -bash deploy.sh +curl -LO https://git.sr.ht/~krisyotam/sdeploy/blob/main/system/sd-wired/deploy.sh +sh deploy.sh ``` The deploy script will: 1. Install packages from `progs.csv` -2. Clone and stow [srice](https://github.com/krisyotam/srice) dotfiles -3. Run post-install configuration +2. Add BlackArch repository +3. Deploy [srice](https://git.sr.ht/~krisyotam/srice) dotfiles +4. Clone slipbox and ctfs repos +5. Run post-install configuration ## Related -- [srice](https://github.com/krisyotam/srice) — The dotfiles this deploys +- [srice](https://git.sr.ht/~krisyotam/srice) -- The dotfiles this deploys diff --git a/compile-all-pdfs.sh b/compile-all-pdfs.sh index 9c17902bc6b6f02c875558e306f8fc3f75b56ac2..e50a5c5d903afaa90ef267886b205e12b2b270ff 100755 --- a/compile-all-pdfs.sh +++ b/compile-all-pdfs.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Compile all manual.tex files across KSD variants -for dir in ksd-*/; do +# Compile all manual.tex files across sd variants +for dir in standard/sd-*/ system/sd-*/; do if [ -f "$dir/manual.tex" ]; then echo "Compiling $dir/manual.tex..." (cd "$dir" && latexmk -pdf manual.tex) diff --git a/ksd-kali/deploy.sh b/ksd-kali/deploy.sh deleted file mode 100755 index 68ed3df0ad6d77eda0eaa21c36949437a603e5b7..0000000000000000000000000000000000000000 --- a/ksd-kali/deploy.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -# KSD - Kris's Simple Deploy for Kali Linux -echo "Not yet implemented" -exit 1 diff --git a/ksd-kali/manual.tex b/ksd-kali/manual.tex deleted file mode 100644 index 3aeee900890731ed23dc8fdcc9c6efab4e80403b..0000000000000000000000000000000000000000 --- a/ksd-kali/manual.tex +++ /dev/null @@ -1,26 +0,0 @@ -\documentclass[12pt]{article} -\usepackage[margin=1in]{geometry} -\usepackage{hyperref} - -\title{KSD Kali Linux Manual} -\author{Kris Yotam} -\date{\today} - -\begin{document} -\maketitle -\tableofcontents - -\section{Introduction} -This manual covers the KSD (Kris's Simple Deploy) script for Kali Linux. - -\section{Prerequisites} -\begin{itemize} - \item A fresh Kali Linux installation - \item Internet connection - \item Root or sudo access -\end{itemize} - -\section{Usage} -TBD. - -\end{document} diff --git a/ksd-ubuntu/deploy.sh b/ksd-ubuntu/deploy.sh deleted file mode 100755 index fa26df5d1ed9c28c9b3e37febc41e8329fa021db..0000000000000000000000000000000000000000 --- a/ksd-ubuntu/deploy.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -# KSD - Kris's Simple Deploy for Ubuntu -echo "Not yet implemented" -exit 1 diff --git a/ksd-ubuntu/manual.tex b/ksd-ubuntu/manual.tex deleted file mode 100644 index 909ea81f91facb65f111315385fdfc4c005130f2..0000000000000000000000000000000000000000 --- a/ksd-ubuntu/manual.tex +++ /dev/null @@ -1,26 +0,0 @@ -\documentclass[12pt]{article} -\usepackage[margin=1in]{geometry} -\usepackage{hyperref} - -\title{KSD Ubuntu Manual} -\author{Kris Yotam} -\date{\today} - -\begin{document} -\maketitle -\tableofcontents - -\section{Introduction} -This manual covers the KSD (Kris's Simple Deploy) script for Ubuntu. - -\section{Prerequisites} -\begin{itemize} - \item A fresh Ubuntu installation - \item Internet connection - \item Root or sudo access -\end{itemize} - -\section{Usage} -TBD. - -\end{document} diff --git a/ksd-artix/deploy.sh b/standard/sd-artix/deploy.sh similarity index 99% rename from ksd-artix/deploy.sh rename to standard/sd-artix/deploy.sh index 8cd2c41f8d213d76c4cbd8a3b72a71aabefa7adf..b5c8d38d918386e9b4ef151d8e71da7a1692f8ef 100755 --- a/ksd-artix/deploy.sh +++ b/standard/sd-artix/deploy.sh @@ -27,9 +27,9 @@ # Repository URLs and branches DOTFILES_REPO="https://github.com/krisyotam/srice.git" DOTFILES_BRANCH="main" -PROGS_FILE="https://raw.githubusercontent.com/krisyotam/sdeploy/main/ksd-artix/progs.csv" -NOTES_FILE="https://raw.githubusercontent.com/krisyotam/sdeploy/main/ksd-artix/notes.csv" -DEV_FILE="https://raw.githubusercontent.com/krisyotam/sdeploy/main/ksd-artix/dev.csv" +PROGS_FILE="https://raw.githubusercontent.com/krisyotam/sdeploy/main/sd-artix/progs.csv" +NOTES_FILE="https://raw.githubusercontent.com/krisyotam/sdeploy/main/sd-artix/notes.csv" +DEV_FILE="https://raw.githubusercontent.com/krisyotam/sdeploy/main/sd-artix/dev.csv" # Doom Emacs repository DOOM_REPO="https://github.com/doomemacs/doomemacs" diff --git a/ksd-artix/dev.csv b/standard/sd-artix/dev.csv similarity index 100% rename from ksd-artix/dev.csv rename to standard/sd-artix/dev.csv diff --git a/ksd-artix/manual.pdf b/standard/sd-artix/manual.pdf similarity index 100% rename from ksd-artix/manual.pdf rename to standard/sd-artix/manual.pdf diff --git a/ksd-artix/manual.tex b/standard/sd-artix/manual.tex similarity index 100% rename from ksd-artix/manual.tex rename to standard/sd-artix/manual.tex diff --git a/ksd-artix/notes.csv b/standard/sd-artix/notes.csv similarity index 100% rename from ksd-artix/notes.csv rename to standard/sd-artix/notes.csv diff --git a/ksd-artix/post-install.sh b/standard/sd-artix/post-install.sh similarity index 100% rename from ksd-artix/post-install.sh rename to standard/sd-artix/post-install.sh diff --git a/ksd-artix/progs.csv b/standard/sd-artix/progs.csv similarity index 100% rename from ksd-artix/progs.csv rename to standard/sd-artix/progs.csv diff --git a/ksd-gentoo/deploy.sh b/standard/sd-gentoo/deploy.sh similarity index 100% rename from ksd-gentoo/deploy.sh rename to standard/sd-gentoo/deploy.sh diff --git a/ksd-gentoo/manual.tex b/standard/sd-gentoo/manual.tex similarity index 100% rename from ksd-gentoo/manual.tex rename to standard/sd-gentoo/manual.tex diff --git a/standard/sd-kali/deploy.sh b/standard/sd-kali/deploy.sh new file mode 100644 index 0000000000000000000000000000000000000000..60fa27b3f335433508e03cd61b7dd44d97b61860 --- /dev/null +++ b/standard/sd-kali/deploy.sh @@ -0,0 +1,4 @@ +#!/bin/sh +# sdeploy - Kali Linux +echo "Not yet implemented" +exit 1 diff --git a/standard/sd-kali/manual.tex b/standard/sd-kali/manual.tex new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/ksd-macos/deploy.sh b/standard/sd-macos/deploy.sh similarity index 100% rename from ksd-macos/deploy.sh rename to standard/sd-macos/deploy.sh diff --git a/ksd-macos/manual.tex b/standard/sd-macos/manual.tex similarity index 100% rename from ksd-macos/manual.tex rename to standard/sd-macos/manual.tex diff --git a/standard/sd-ubuntu/deploy.sh b/standard/sd-ubuntu/deploy.sh new file mode 100644 index 0000000000000000000000000000000000000000..68a8a02771ae0f067ddd68f3c1612d473599ca72 --- /dev/null +++ b/standard/sd-ubuntu/deploy.sh @@ -0,0 +1,4 @@ +#!/bin/sh +# sdeploy - Ubuntu +echo "Not yet implemented" +exit 1 diff --git a/standard/sd-ubuntu/manual.tex b/standard/sd-ubuntu/manual.tex new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/ksd-win11/deploy.sh b/standard/sd-win11/deploy.sh similarity index 100% rename from ksd-win11/deploy.sh rename to standard/sd-win11/deploy.sh diff --git a/ksd-win11/manual.tex b/standard/sd-win11/manual.tex similarity index 100% rename from ksd-win11/manual.tex rename to standard/sd-win11/manual.tex diff --git a/system/sd-eva01/deploy.sh b/system/sd-eva01/deploy.sh new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/system/sd-eva01/manual.tex b/system/sd-eva01/manual.tex new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/system/sd-eva01/progs.csv b/system/sd-eva01/progs.csv new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/system/sd-moirai/deploy.sh b/system/sd-moirai/deploy.sh new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/system/sd-moirai/manual.tex b/system/sd-moirai/manual.tex new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/system/sd-moirai/progs.csv b/system/sd-moirai/progs.csv new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/system/sd-motoko/deploy.sh b/system/sd-motoko/deploy.sh new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/system/sd-motoko/manual.tex b/system/sd-motoko/manual.tex new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/system/sd-motoko/progs.csv b/system/sd-motoko/progs.csv new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/system/sd-wired/deploy.sh b/system/sd-wired/deploy.sh new file mode 100644 index 0000000000000000000000000000000000000000..5e14a84cb0935d2a884d40b00fd7eb46ac4c2ddc --- /dev/null +++ b/system/sd-wired/deploy.sh @@ -0,0 +1,297 @@ +#!/bin/sh + +# ============================================================================ +# +# ██╗ █████╗ ███████╗██╗ ██╗██╗ ██╗██████╗ ██╗███████╗ Z +# ██║ ██╔══██╗╚══███╔╝╚██╗ ██╔╝██║ ██╔╝██╔══██╗██║██╔════╝ Z +# ██║ ███████║ ███╔╝ ╚████╔╝ █████╔╝ ██████╔╝██║███████╗ z +# ██║ ██╔══██║ ███╔╝ ╚██╔╝ ██╔═██╗ ██╔══██╗██║╚════██║ z +# ███████╗██║ ██║███████╗ ██║ ██║ ██╗██║ ██║██║███████║ +# ╚══════╝╚═╝ ╚═╝╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚══════╝ +# +# sdeploy - Kris's Auto Rice Bootstrapping Scripts +# "The only way to do great work is to automate the boring parts." +# +# System: Wired (Artix OpenRC pentesting workstation) +# Author: Kris Yotam +# Contact: kris@krisyotam.com +# License: GPL-3.0-only +# Repository: https://git.sr.ht/~krisyotam/sdeploy +# ============================================================================ + +### OPTIONS AND VARIABLES ### + +dotfilesrepo="https://git.sr.ht/~krisyotam/srice" +progsfile="https://git.sr.ht/~krisyotam/sdeploy/blob/main/system/sd-wired/progs.csv" +aurhelper="yay" +repobranch="main" +blackarchstrap="https://blackarch.org/strap.sh" +export TERM=ansi + +### FUNCTIONS ### + +installpkg() { + pacman --noconfirm --needed -S "$1" >/dev/null 2>&1 +} + +error() { + printf "%s\n" "$1" >&2 + exit 1 +} + +welcomemsg() { + whiptail --title "Wired Deploy" \ + --msgbox "This script bootstraps an Artix OpenRC pentesting workstation with dwm, srice dotfiles, and BlackArch tools.\n\n-Kris" 10 60 + + whiptail --title "Preflight" --yes-button "Ready" \ + --no-button "Cancel" \ + --yesno "Ensure:\n\n1. Running as root\n2. Pacman is synced\n3. Keyrings are current\n4. Internet is up" 12 60 +} + +getuserandpass() { + name=$(whiptail --inputbox "Enter a username for the account." 10 60 3>&1 1>&2 2>&3 3>&1) || exit 1 + while ! echo "$name" | grep -q "^[a-z_][a-z0-9_-]*$"; do + name=$(whiptail --nocancel --inputbox "Invalid. Lowercase letters, digits, - or _ only." 10 60 3>&1 1>&2 2>&3 3>&1) + done + pass1=$(whiptail --nocancel --passwordbox "Enter a password for $name." 10 60 3>&1 1>&2 2>&3 3>&1) + pass2=$(whiptail --nocancel --passwordbox "Confirm password." 10 60 3>&1 1>&2 2>&3 3>&1) + while [ "$pass1" != "$pass2" ]; do + unset pass2 + pass1=$(whiptail --nocancel --passwordbox "Mismatch. Enter password again." 10 60 3>&1 1>&2 2>&3 3>&1) + pass2=$(whiptail --nocancel --passwordbox "Confirm password." 10 60 3>&1 1>&2 2>&3 3>&1) + done +} + +usercheck() { + ! { id -u "$name" >/dev/null 2>&1; } || + whiptail --title "WARNING" --yes-button "CONTINUE" \ + --no-button "Cancel" \ + --yesno "User \`$name\` already exists. Conflicting dotfiles will be overwritten. Personal files are untouched.\n\nPassword will be changed to what you entered." 12 70 +} + +preinstallmsg() { + whiptail --title "Ready" --yes-button "Go" \ + --no-button "Cancel" \ + --yesno "Installation is fully automated from here. This will take a while.\n\nPress to begin." 10 60 || { + clear + exit 1 + } +} + +adduserandpass() { + whiptail --infobox "Adding user \"$name\"..." 7 50 + useradd -m -g wheel -s /bin/mksh "$name" >/dev/null 2>&1 || + usermod -a -G wheel "$name" && mkdir -p /home/"$name" && chown "$name":wheel /home/"$name" + export repodir="/home/$name/.local/src" + mkdir -p "$repodir" + chown -R "$name":wheel "$(dirname "$repodir")" + echo "$name:$pass1" | chpasswd + unset pass1 pass2 +} + +refreshkeys() { + case "$(readlink -f /sbin/init)" in + *systemd*) + whiptail --infobox "Refreshing Arch keyring..." 7 40 + pacman --noconfirm -S archlinux-keyring >/dev/null 2>&1 + ;; + *) + whiptail --infobox "Enabling Arch repos for Artix..." 7 50 + pacman --noconfirm --needed -S \ + artix-keyring artix-archlinux-support >/dev/null 2>&1 + grep -q "^\[extra\]" /etc/pacman.conf || + echo "[extra] +Include = /etc/pacman.d/mirrorlist-arch" >>/etc/pacman.conf + pacman -Sy --noconfirm >/dev/null 2>&1 + pacman-key --populate archlinux >/dev/null 2>&1 + ;; + esac +} + +setupblackarch() { + whiptail --infobox "Adding BlackArch repository..." 7 50 + curl -Ls "$blackarchstrap" | sh >/dev/null 2>&1 + pacman -Sy --noconfirm >/dev/null 2>&1 +} + +manualinstall() { + pacman -Qq "$1" && return 0 + whiptail --infobox "Installing \"$1\" manually..." 7 50 + sudo -u "$name" mkdir -p "$repodir/$1" + sudo -u "$name" git -C "$repodir" clone --depth 1 --single-branch \ + --no-tags -q "https://aur.archlinux.org/$1.git" "$repodir/$1" || + { + cd "$repodir/$1" || return 1 + sudo -u "$name" git pull --force origin master + } + cd "$repodir/$1" || exit 1 + sudo -u "$name" makepkg --noconfirm -si >/dev/null 2>&1 || return 1 +} + +maininstall() { + whiptail --title "Wired" --infobox "[$n/$total] $1 $2" 7 70 + installpkg "$1" +} + +aurinstall() { + whiptail --title "Wired" --infobox "[$n/$total] (AUR) $1 $2" 7 70 + echo "$aurinstalled" | grep -q "^$1$" && return 0 + sudo -u "$name" $aurhelper -S --noconfirm "$1" >/dev/null 2>&1 +} + +gitmakeinstall() { + progname="${1##*/}" + progname="${progname%.git}" + dir="$repodir/$progname" + whiptail --title "Wired" --infobox "[$n/$total] (git) $progname $2" 7 70 + sudo -u "$name" git -C "$repodir" clone --depth 1 --single-branch \ + --no-tags -q "$1" "$dir" || + { + cd "$dir" || return 1 + sudo -u "$name" git pull --force origin master + } + cd "$dir" || exit 1 + make >/dev/null 2>&1 + make install >/dev/null 2>&1 + cd /tmp || return 1 +} + +installationloop() { + ([ -f "$progsfile" ] && cp "$progsfile" /tmp/progs.csv) || + curl -Ls "$progsfile" | sed '/^#/d' >/tmp/progs.csv + total=$(wc -l /dev/null 2>&1 + +# Create user +adduserandpass || error "Error creating user." + +[ -f /etc/sudoers.pacnew ] && cp /etc/sudoers.pacnew /etc/sudoers + +# Temp passwordless sudo for builds +trap 'rm -f /etc/sudoers.d/wired-temp' HUP INT QUIT TERM PWR EXIT +echo "%wheel ALL=(ALL) NOPASSWD: ALL +Defaults:%wheel,root runcwd=*" >/etc/sudoers.d/wired-temp + +# Pacman tweaks +grep -q "ILoveCandy" /etc/pacman.conf || sed -i "/#VerbosePkgLists/a ILoveCandy" /etc/pacman.conf +sed -Ei "s/^#(ParallelDownloads).*/\1 = 5/;/^#Color$/s/#//" /etc/pacman.conf + +# Use all cores for compilation +sed -i "s/-j2/-j$(nproc)/;/^#MAKEFLAGS/s/^#//" /etc/makepkg.conf + +# AUR helper +manualinstall "$aurhelper" || error "Failed to install AUR helper." +$aurhelper -Y --save --devel + +# BlackArch repo +setupblackarch || error "Failed to add BlackArch repo." + +# Install everything from progs.csv +installationloop + +# Deploy dotfiles +putgitrepo "$dotfilesrepo" "/home/$name" + +# Kill the beep +rmmod pcspkr 2>/dev/null +echo "blacklist pcspkr" >/etc/modprobe.d/nobeep.conf + +# mksh as default interactive shell +chsh -s /bin/mksh "$name" >/dev/null 2>&1 + +# Home directory scaffold +for d in downloads src slipbox mail pix vids; do + sudo -u "$name" mkdir -p "/home/$name/$d" +done +sudo -u "$name" mkdir -p "/home/$name/.config/abook" +sudo -u "$name" mkdir -p "/home/$name/.config/mpd/playlists" + +# Clone repos +whiptail --infobox "Cloning slipbox..." 7 50 +sudo -u "$name" git clone --depth 1 -q \ + "https://git.sr.ht/~krisyotam/slipbox" "/home/$name/slipbox" >/dev/null 2>&1 || true +whiptail --infobox "Cloning ctfs..." 7 50 +sudo -u "$name" git clone --depth 1 -q \ + "https://git.sr.ht/~krisyotam/ctfs" "/home/$name/ctfs" >/dev/null 2>&1 || true + +# Dash as /bin/sh +ln -sfT /bin/dash /bin/sh >/dev/null 2>&1 + +# dbus UUID for Artix +dbus-uuidgen >/var/lib/dbus/machine-id + +# dbus-launch for non-systemd session +[ "$(readlink -f /sbin/init)" != "/usr/lib/systemd/systemd" ] && + echo "export \$(dbus-launch)" >/etc/profile.d/dbus.sh + +# Tap to click +[ ! -f /etc/X11/xorg.conf.d/40-libinput.conf ] && printf 'Section "InputClass" + Identifier "libinput touchpad catchall" + MatchIsTouchpad "on" + MatchDevicePath "/dev/input/event*" + Driver "libinput" + Option "Tapping" "on" +EndSection' >/etc/X11/xorg.conf.d/40-libinput.conf + +# Sudoers +echo "%wheel ALL=(ALL:ALL) ALL" >/etc/sudoers.d/00-wheel-can-sudo +echo "%wheel ALL=(ALL:ALL) NOPASSWD: /usr/bin/shutdown,/usr/bin/reboot,/usr/bin/mount,/usr/bin/umount,/usr/bin/pacman -Syu,/usr/bin/pacman -Syyu,/usr/bin/pacman -Syyu --noconfirm,/usr/bin/loadkeys,/usr/bin/pacman -Syyuw --noconfirm" >/etc/sudoers.d/01-cmds-without-password +echo "Defaults editor=/usr/bin/nvim" >/etc/sudoers.d/02-visudo-editor +mkdir -p /etc/sysctl.d +echo "kernel.dmesg_restrict = 0" >/etc/sysctl.d/dmesg.conf + +# Cleanup +rm -f /etc/sudoers.d/wired-temp + +finalize diff --git a/system/sd-wired/manual.tex b/system/sd-wired/manual.tex new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/system/sd-wired/progs.csv b/system/sd-wired/progs.csv new file mode 100644 index 0000000000000000000000000000000000000000..fdecc4c511ceb0d51d31fbd8142c5183e09a9be2 --- /dev/null +++ b/system/sd-wired/progs.csv @@ -0,0 +1,240 @@ +#TAG,PACKAGE,DESCRIPTION +# +# Legend: +# (empty) = pacman (Artix + Arch repos via artix-archlinux-support) +# A = AUR (via yay) +# G = Git clone + make install +# +# ===================================================================== +# Suckless +# ===================================================================== +G,https://git.sr.ht/~krisyotam/dwm,"is the tiling window manager." +G,https://git.sr.ht/~krisyotam/dwmblocks,"serves as the modular status bar." +G,https://git.sr.ht/~krisyotam/dmenu,"runs commands and provides a UI for selection." +G,https://git.sr.ht/~krisyotam/st,"is the terminal emulator." +G,https://git.sr.ht/~krisyotam/scron,"is a simple cron daemon." +G,https://git.sr.ht/~krisyotam/quark,"is a tiny HTTP server." +G,https://git.sr.ht/~krisyotam/surf,"is a minimal webkit browser." +G,https://git.sr.ht/~krisyotam/slock,"locks the screen." +G,https://git.sr.ht/~krisyotam/tabbed,"embeds X clients into a tabbed container." +# +# ===================================================================== +# X11 / System +# ===================================================================== +,xorg-server,"is the graphical server. May take a while as it pulls many dependencies on clean installs." +,xorg-xinit,"starts the graphical server." +,xorg-xwininfo,"allows querying information about windows." +,xorg-xset,"is a utility for configuring the X server." +,xorg-xprop,"is a tool for detecting window properties." +,xorg-xbacklight,"enables changing screen brightness levels." +,polkit,"manages user policies." +,picom,"is a compositor for transparency and removing screen-tearing." +,xwallpaper,"sets the wallpaper." +,xclip,"allows copying and pasting from the command line." +,xdotool,"provides window action utilities on the command line." +,unclutter,"hides an inactive mouse cursor." +,arandr,"allows the user to customize monitor arrangements." +,libnotify,"allows desktop notifications." +,dunst,"is a suckless notification daemon." +# +# ===================================================================== +# Shells +# ===================================================================== +,mksh,"is the MirBSD Korn Shell, the default interactive shell." +,dash,"is a POSIX shell used as /bin/sh." +A,plan9port,"provides Plan 9 userspace including rc, acme, and sam." +# +# ===================================================================== +# Editors +# ===================================================================== +,neovim,"is a tidier vim with useful features." +,emacs,"is an extensible text editor." +# +# ===================================================================== +# Fonts +# ===================================================================== +,noto-fonts,"is an expansive Unicode font package." +,noto-fonts-cjk,"provides Chinese Japanese Korean support." +,noto-fonts-emoji,"is an emoji font." +,ttf-liberation,"provides metric-compatible Arial Times Courier." +,ttf-dejavu,"provides excellent Unicode coverage." +,ttf-font-awesome,"provides extended glyph support." +,otf-libertinus,"provides the serif and sans fonts." +,ttf-fira-code,"is a coding font with ligatures." +,ttf-hack,"is the Hack monospace font." +,ttf-jetbrains-mono,"is JetBrains Mono font." +,ttf-jetbrains-mono-nerd,"is JetBrains Mono with Nerd icons." +,ttf-firacode-nerd,"is Fira Code with Nerd icons." +,ttf-hack-nerd,"is Hack with Nerd icons." +,ttf-nerd-fonts-symbols,"provides standalone Nerd symbols." +,fontconfig,"manages font configuration." +# +# ===================================================================== +# Terminal Programs +# ===================================================================== +,nnn,"is a fast terminal file manager." +,ueberzugpp,"enables previews in the terminal file manager." +,dvtm,"is a dynamic virtual terminal manager." +,btop,"is a graphical system monitor." +,bc,"is a mathematics language used for the dropdown calculator." +,calcurse,"is a terminal-based organizer." +A,sc-im,"is an Excel-like terminal spreadsheet." +,newsboat,"is a terminal RSS client." +,neomutt,"is a terminal email client." +A,mutt-wizard-git,"is a light-weight terminal-based email setup wizard." +A,abook,"is an offline addressbook usable by neomutt." +,ncmpcpp,"is a ncurses interface for music with a powerful tag editor." +,lynx,"is a terminal browser used for previews of websites and HTML." +,bat,"highlights code output and generates previews in the file browser." +,fzf,"is a fuzzy finder for easy selection and location of files." +,nsxiv,"is a minimalist image viewer." +,zathura,"is a pdf viewer with vim-like bindings." +,zathura-pdf-mupdf,"allows mupdf compatibility in zathura." +# +# ===================================================================== +# Audio / Video +# ===================================================================== +,mpd,"is a lightweight music daemon." +,mpc,"is a terminal interface for mpd." +,mpv,"is the video player." +,ffmpeg,"can record and splice video and audio on the command line." +,ffmpegthumbnailer,"creates thumbnail previews of video files." +,pipewire,"is the audio server." +,wireplumber,"is the audio session manager." +,pipewire-pulse,"gives pipewire compatibility with PulseAudio programs." +,pulsemixer,"is a terminal audio controller." +,alsa-utils,"provides ALSA utilities including amixer." +# +# ===================================================================== +# Filesystem +# ===================================================================== +,dosfstools,"allows the computer to access DOS-like filesystems." +,exfatprogs,"allows management of exFAT drives." +,ntfs-3g,"allows accessing NTFS partitions." +A,simple-mtpfs,"enables mounting of cell phones." +# +# ===================================================================== +# Utilities +# ===================================================================== +,man-db,"lets you read man pages of programs." +,maim,"can take quick screenshots." +,unzip,"unzips zips." +,atool,"manages and gives information about archives." +,poppler,"manipulates pdfs and gives pdf previews." +,mediainfo,"shows audio and video information for the file browser." +,socat,"establishes two byte streams and transfers data between them." +,moreutils,"is a collection of useful unix tools." +,tesseract,"is a command-line OCR engine." +,tesseract-data-eng,"is the English language pack for OCR." +,imagemagick,"manipulates images from the command line." +,perl-image-exiftool,"reads and writes EXIF metadata." +,fd,"is a fast find replacement." +,ripgrep,"is a fast grep replacement." +,jq,"processes JSON." +,wget,"downloads files." +,rsync,"syncs files." +,rclone,"syncs cloud storage." +,curl,"transfers data." +,eza,"is a modern ls replacement." +,zoxide,"is a smarter cd command." +,fastfetch,"displays system info." +A,task-spooler,"queues commands or files for download." +# +# ===================================================================== +# Theming +# ===================================================================== +,gnome-keyring,"serves as the system keyring." +A,python-pywal,"generates colorschemes from wallpapers." +# +# ===================================================================== +# Browsers +# ===================================================================== +A,librewolf-bin,"is a privacy-focused browser." +A,librewolf-extension-localcdn-bin,"provides local emulation of Content Delivery Networks." +A,librewolf-extension-istilldontcareaboutcookies-bin,"removes annoying cookie banners." +A,librewolf-extension-tridactyl-bin,"provides vim bindings in the browser." +A,librewolf-extension-ublock-origin-bin,"is the best ad blocker." +A,arkenfox-user.js,"provides hardened security settings for Librewolf." +,torbrowser-launcher,"launches the Tor browser." +# +# ===================================================================== +# Networking / VPN +# ===================================================================== +,networkmanager,"provides nmtui for wifi management." +,openssh,"is the SSH client and server." +,openvpn,"is the OpenVPN client." +A,mullvad-vpn-bin,"is the Mullvad VPN client." +,proxychains-ng,"chains proxies." +# +# ===================================================================== +# Security / Crypto +# ===================================================================== +,gnupg,"provides GPG encryption." +,pass,"is a password manager using GPG." +# +# ===================================================================== +# Compilers / Languages +# ===================================================================== +,gcc,"is the C and C++ compiler." +,python,"is the Python interpreter." +,python-pip,"is the Python package manager." +,go,"is the Go language." +# +# ===================================================================== +# Tools +# ===================================================================== +,git,"is version control." +A,claude-code-bin,"is the Anthropic AI CLI." +# +# ===================================================================== +# BlackArch - Recon +# ===================================================================== +,nmap,"scans networks and discovers hosts and services." +,masscan,"is a fast TCP port scanner." +,whatweb,"identifies websites and web technologies." +,gobuster,"brute-forces URIs, DNS subdomains, and virtual hosts." +,feroxbuster,"is a fast content discovery tool." +,dirb,"scans web servers for hidden content." +,nikto,"scans web servers for known vulnerabilities." +,enum4linux,"enumerates information from Windows and Samba systems." +,seclists,"provides wordlists for security assessments." +# +# ===================================================================== +# BlackArch - Exploitation +# ===================================================================== +,metasploit,"is an exploitation framework." +,sqlmap,"automates SQL injection detection and exploitation." +,exploitdb,"is a searchable archive of exploits." +,hydra,"brute-forces remote authentication services." +,evil-winrm,"provides remote shell access via WinRM." +,responder,"poisons LLMNR, NBT-NS, and MDNS." +,impacket,"provides Python classes for working with network protocols." +,crackmapexec,"is a swiss army knife for pentesting networks." +# +# ===================================================================== +# BlackArch - Cracking +# ===================================================================== +,hashcat,"recovers passwords via GPU-accelerated cracking." +,john,"is a password cracker." +# +# ===================================================================== +# BlackArch - Network +# ===================================================================== +,wireshark-cli,"captures and analyzes network traffic." +,tcpdump,"captures network packets from the command line." +,netcat,"reads and writes data across network connections." +,aircrack-ng,"audits wireless networks." +,wfuzz,"is a web application brute-forcer." +,smbclient,"accesses SMB/CIFS shares." +,bloodhound,"maps Active Directory attack paths." +# +# ===================================================================== +# BlackArch - Forensics / RE +# ===================================================================== +,binwalk,"analyzes and extracts firmware images." +,radare2,"is a reverse engineering framework." +,ghidra,"is a software reverse engineering suite." +,volatility3,"performs memory forensics." +,foremost,"recovers files based on headers and footers." +,steghide,"hides data inside images and audio files." +,burpsuite,"is a web application security testing platform."