$ show hlissner/dotfiles
This is a personal dotfiles repository for NixOS, authored by Henrik Lissner (hlissner). It serves as a complete, declarative system configuration for multiple machines (laptops, desktops, and a HTPC) using Nix flakes. The repository defines the entire systemβfrom the bootloader and kernel parameters to the desktop environment (Hyprland), shell (zsh, tmux), development tools, and custom utilities. It is not a standalone application but a collection of configuration files, NixOS modules, and scripts that together form a highly opinionated, reproducible computing environment. The architecture is centered around a Nix flake (flake.nix) that imports modular NixOS modules organized by category (desktop, development, editors, shell, services, hardware profiles, themes, etc.). A custom CLI tool called 'hey' (written in Janet) provides a command hub for system management tasks like rebuilding, garbage collection, profile switching, and dotfile synchronization. The desktop environment is heavily customized with Hyprland (Wayland compositor), rofi launcher menus, matugen-based dynamic theming, and a suite of utility scripts for screenshots, screen recording, audio, and more. While the repository is not designed for reuse by others (it explicitly warns against being used as a community framework), several components demonstrate high craftsmanship and could be extracted with minimal modification. The Janet libraries under lib/hey/ provide a reusable command-line argument parser, an async rofi interaction library, and general utility functions. The Nix library (lib/nixos.nix) implements a flake builder pattern that could be adapted for other multi-host NixOS setups. The matugen templates and rofi themes are also potentially reusable as standalone theming assets.
The LLM identified 3 files worth highlighting for reuse:
An async rofi interaction library in Janet that provides high-level macros (call, pick, prompt, chain) for spawning rofi dialogs, handling streaming I/O via ev/go coroutines, and passing data base64-encoded. The abstraction cleanly separates rofi invocation from result processing, making it reusable in any Janet project that needs an interactive menu system. The library does not depend on the rest of the dotfiles and could be extracted with no changes.
A declarative command-line argument parser for Janet, built with a 'defcmd' macro that supports short/long options, positional arguments, variadic args, defaults, and validation stubs. The parser generates an option table from a concise DSL, making it easy to define CLI interfaces without boilerplate. It is a standalone, well-structured library that could be reused in any Janet-based CLI application.
A collection of general-purpose utility functions for Janet, including compile-time PEG patterns (peg!), safe environment variable access (with-envvars), umask management (with-umask), mutating array operations (take!, drop!), and path manipulation (path/sibling). These functions are self-contained, idiomatic, and solve common problems in Janet scripting. They could be extracted into a standalone utility library without modification.