From 9baaaa2bfe5a5cb3cbc67b047699040091708b27 Mon Sep 17 00:00:00 2001 From: Hadi <112569860+anotherhadi@users.noreply.github.com> Date: Fri, 14 Aug 2026 10:32:14 +0200 Subject: [PATCH] Less GUI, more TUI Signed-off-by: Hadi <112569860+anotherhadi@users.noreply.github.com> --- home/programs/gui/pkgs.nix | 11 +++--- home/programs/tui/pkgs.nix | 21 ++++++------ home/programs/tui/wikiman/default.nix | 49 +++++++++++++++++++++++++++ hosts/laptop/home.nix | 1 + 4 files changed, 65 insertions(+), 17 deletions(-) create mode 100644 home/programs/tui/wikiman/default.nix diff --git a/home/programs/gui/pkgs.nix b/home/programs/gui/pkgs.nix index 4ad12c68..12888523 100644 --- a/home/programs/gui/pkgs.nix +++ b/home/programs/gui/pkgs.nix @@ -2,18 +2,15 @@ home.packages = with pkgs; [ vlc # Video player obsidian # Note taking app - textpieces # Manipulate texts - resources # Resource monitor - gnome-clocks # Clocks app - gnome-text-editor # Basic graphic text editor pinta # Image editor - switcheroo # Convert images between different formats onlyoffice-desktopeditors # Office suite blanket # Listen to different sounds - thunar # File explorer - signal-desktop # Messaging app ticktick # Todo app + + # Backup + thunar + gnome-text-editor ]; home.persistence."/persist".directories = [ diff --git a/home/programs/tui/pkgs.nix b/home/programs/tui/pkgs.nix index 3d52504c..b8e2e5d6 100644 --- a/home/programs/tui/pkgs.nix +++ b/home/programs/tui/pkgs.nix @@ -1,9 +1,11 @@ -{pkgs, ...}: { +{ + pkgs, + pkgs-unstable, + ... +}: { home.packages = with pkgs; [ # I love TUIs caligula # User-friendly, lightweight TUI for disk imaging (ISO, USB BOOT) - dysk # A terminal-based disk usage analyzer - wikiman # Offline search engine for manual pages (arch wiki, tldr) tealdeer # Fast tldr client sttr # A minimalist CyberChef-like, cross-platform CLI app for performing various operations on strings slides # A terminal-based presentation tool that allows you to create and deliver presentations directly from the command line @@ -11,17 +13,15 @@ tabiew # A terminal-based CSV viewer and manipulator jless # A pager for JSON pkgs.nur.repos.anotherhadi.usbguard-tui # TUI for managing USBGuard rules - pkgs.nur.repos.anotherhadi.sheets # Terminal based spreadsheet tool pkgs.nur.repos.anotherhadi.settuings # Terminal based settings (wifi, bluetooth, audio, ...) - rainfrog # TODO: To test - posting # TODO: To test - newsboat # TODO: To test - dooit # TODO: To test + pkgs.nur.repos.anotherhadi.fztea # Flipper Zero from the terminal + pkgs.nur.repos.anotherhadi.monitui # Edit hyprland's monitor configuration + dua # Tool to conveniently learn about the disk usage of directories + mcat # Cat command for documents / images / videos and more + lazyjournal - # I love CLIs httpie # Command-line HTTP client, a user-friendly cURL replacement gh # GitHub - gh-dash # A terminal dashboard for GitHub figlet # Transform text into ASCII art pastel # Command-line tool to generate, analyze, convert and manipulate colors imagemagick # Image manipulation tool @@ -35,6 +35,7 @@ pipes cmatrix fastfetch + smassh # typing test, 10fastfinger like ]; home.persistence."/persist".directories = [".config/gh" ".config/gh-dash"]; diff --git a/home/programs/tui/wikiman/default.nix b/home/programs/tui/wikiman/default.nix new file mode 100644 index 00000000..f04da971 --- /dev/null +++ b/home/programs/tui/wikiman/default.nix @@ -0,0 +1,49 @@ +{ + pkgs, + lib, + ... +}: let + # wikiman ships without the ArchWiki/tldr-pages databases (too heavy to + # bundle). These are fetched declaratively from wikiman's own release + # snapshots and baked into a wrapped `wikiman` so `-S` shows them as + # installed offline, no manual `make source-*` step required. + # To refresh: bump the release tag/date below and update the hashes + # (`nix hash file --sri `). + # + # Download size (compressed): ~17M ArchWiki + ~3.4M tldr-pages. + # Store size (unpacked): ~239M ArchWiki + ~147M tldr-pages (~385M total). + archWikiSrc = pkgs.fetchurl { + url = "https://github.com/filiparag/wikiman/releases/download/2.14.1/arch-wiki_20260810.source.tar.xz"; + hash = "sha256-82aiDvwZ07m9CfBVYIDLSUpWds4QxUbCbCPmQ26j1XI="; + }; + tldrPagesSrc = pkgs.fetchurl { + url = "https://github.com/filiparag/wikiman/releases/download/2.14.1/tldr-pages_20260810.source.tar.xz"; + hash = "sha256-2vdszVMImSN1UF+OepKdj1v+lsG2jM68gcpnUJyqddw="; + }; + + # Real files (not symlinks): wikiman's source-detection does `find -type f` + # on this dir, which doesn't match symlinks, so `pkgs.symlinkJoin` alone + # won't work here. + data = pkgs.runCommand "wikiman-data" {nativeBuildInputs = [pkgs.xz];} '' + mkdir -p $out + cp -r ${pkgs.wikiman}/share $out/share + chmod -R u+w $out/share + tar xf ${archWikiSrc} -C $out --strip-components=1 + tar xf ${tldrPagesSrc} -C $out --strip-components=1 + ''; + + wikiman-full = pkgs.symlinkJoin { + name = "wikiman-full"; + paths = [pkgs.wikiman]; + nativeBuildInputs = [pkgs.makeWrapper]; + postBuild = '' + rm $out/bin/wikiman + makeWrapper ${pkgs.wikiman}/bin/.wikiman-wrapped $out/bin/wikiman \ + --prefix PATH : "${lib.makeBinPath [pkgs.fzf pkgs.ripgrep pkgs.gawk pkgs.w3m pkgs.coreutils pkgs.parallel]}" \ + --set conf_sys_usr "${data}" + ''; + meta.mainProgram = "wikiman"; + }; +in { + home.packages = [wikiman-full]; # Offline search engine for manual pages, ArchWiki and tldr +} diff --git a/hosts/laptop/home.nix b/hosts/laptop/home.nix index 3d2e048f..a4d8564b 100644 --- a/hosts/laptop/home.nix +++ b/hosts/laptop/home.nix @@ -23,6 +23,7 @@ ../../home/programs/tui/nix-utils ../../home/programs/tui/spotatui ../../home/programs/tui/elio + ../../home/programs/tui/wikiman ../../home/programs/tui/pkgs.nix ## GROUPS