split off terminal utilities

This commit is contained in:
2026-04-22 18:45:00 -04:00
parent c3cc94a305
commit 1be21b6c52
7 changed files with 243 additions and 226 deletions

View File

@@ -227,4 +227,11 @@
uris = [ "qemu:///system" ];
};
};
# macOS-style clipboard aliases — depend on wl-clipboard, so scoped here
# rather than in the shared fish config.
programs.fish.shellAliases = {
pbcopy = "${pkgs.wl-clipboard}/bin/wl-copy";
pbpaste = "${pkgs.wl-clipboard}/bin/wl-paste";
};
}

View File

@@ -59,66 +59,89 @@ let
# jasmin
];
common_tools = with pkgs; [
# hex viewer
hexyl
# find typos in code
typos
# replacements for common posix tools
eza # ls replacement
bat # pretty `cat` clone
delta # viewer for `git` and `diff` output
dust # pretty `du` version
duf # better `df` clone
gping # `ping`... but with a graph!!
tldr # `man` but more straight-forward and simpler
ripgrep # grep, but written in rust, respects .gitignore, and very very fast, command is `rg`
fd # alternative to `find`
# status tools
htop
bottom
# other tools
unzip
wget
killall
file
b3sum
# "A hexadecimal, binary, and ASCII dump utility with color support"
tinyxxd
# networking tool
lsof
# view SMART status of drives
# hardware diagnostics — wanted on dev machines, not part of the shared
# terminal profile (which is meant to be portable to any machine).
hw_diag = with pkgs; [
smartmontools
# adds `sensors` command
lm_sensors
# lspci
pciutils
];
# dev-only tools. Universal CLI (bat, rg, htop, jq, …) lives in terminal.nix.
dev_tools = with pkgs; [
# python formatter
ruff
# for website generation
hugo
go
waypipe
sshfs
# serial viewer
minicom
ffmpeg-full
# microcontroller tooling
probe-rs-tools
(python313.withPackages (
ps: with ps; [
mypy # type checking
types-requests # add types for requests methods
python-lsp-server # lsp
python-lsp-ruff # ruff integration
pyserial
numpy
matplotlib
notebook
pandas
]
))
binwalk
# clang-format and clang-tidy
clang-tools
clang
gdb
nixpkgs-review
nmap
# terminal image viewer
timg
tcpdump
borgbackup
# used to deploy nix system to server
# (and in the future, desktop)
deploy-rs
# power stuff
powerstat
yt-dlp
# JS runtime
bun
# convert between various units
units
jq
# DNS things
dig
bun
];
in
{
imports = [
../progs/fish.nix
../progs/helix.nix
./terminal.nix
../progs/pi.nix
(
{ ... }:
@@ -132,92 +155,23 @@ in
home.stateVersion = stateVersion;
home.packages =
with pkgs;
lib.concatLists [
[
# python formatter
ruff
home.packages = lib.concatLists [
rust_pkgs
lsps
java_tools
hw_diag
dev_tools
];
# for website generation
hugo
go
# fish aliases that depend on packages only present in this profile.
# Universal aliases (ls/la/ll/lt, git-size) live in home/progs/fish.nix.
programs.fish.shellAliases = {
c = "${lib.getExe pkgs.cargo}";
cr = "${lib.getExe pkgs.cargo} run";
cb = "${lib.getExe pkgs.cargo} build";
# for benchmaking stuff
hyperfine
pfetch-rs
waypipe
sshfs
# nix formatter
nixfmt-tree
# serial viewer
minicom
# "~~matt's~~ my trace route"
mtr
ffmpeg-full
# microcontroller tooling
probe-rs-tools
(python313.withPackages (
ps: with ps; [
mypy # type checking
types-requests # add types for requests methods
python-lsp-server # lsp
python-lsp-ruff # ruff integration
pyserial
numpy
matplotlib
notebook
pandas
]
))
binwalk
# clang-format and clang-tidy
clang-tools
clang
gdb
git-crypt
imagemagick
nixpkgs-review
nmap
# terminal image viewer
timg
tcpdump
borgbackup
# used to deploy nix system to server
# (and in the future, desktop)
deploy-rs
# power stuff
powerstat
yt-dlp
]
rust_pkgs
lsps
java_tools
common_tools
];
gcc-native = "${lib.getExe pkgs.gcc} -Q --help=target -mtune=native -march=native | ${lib.getExe pkgs.gnugrep} -E '^\\s+\\-(mtune|march)=' | ${pkgs.coreutils}/bin/tr -d '[:blank:]'";
};
# https://github.com/flamegraph-rs/flamegraph
home.file.".cargo/config.toml".text = ''
@@ -225,38 +179,4 @@ in
linker = "${lib.getExe pkgs.clang}"
rustflags = ["-Clink-arg=-Wl,--no-rosegment"]
'';
# git (self explanatory)
programs.git = {
enable = true;
package = pkgs.git;
lfs.enable = true;
ignores = [ ".sisyphus" ];
settings = {
init = {
# master -> main
defaultBranch = "main";
};
push.autoSetupRemote = true;
user = {
name = "Simon Gardling";
email = "titaniumtown@proton.me";
};
};
# gpg signing keys
signing = {
key = "9AB28AC10ECE533D";
signByDefault = true;
};
};
# better way to view diffs
programs.delta = {
enable = true;
enableGitIntegration = true;
};
}

102
home/profiles/terminal.nix Normal file
View File

@@ -0,0 +1,102 @@
# Shared terminal-tools profile.
#
# The set of CLI tooling I want available on every machine I use:
# - mreow + yarn pick this up via home/profiles/no-gui.nix
# - muffin picks this up via hosts/muffin/home.nix
# - any non-NixOS machine picks it up via the homeConfigurations output in flake.nix
#
# Scope is intentionally narrow: the daily-driver shell (fish + helix + modern
# CLI replacements + git). No language toolchains, no hardware-specific admin
# tools, no GUI-adjacent utilities — those belong in profiles layered on top.
{
lib,
pkgs,
...
}:
{
imports = [
../progs/fish.nix
../progs/helix.nix
];
home.packages = with pkgs; [
# modern CLI replacements for POSIX basics
eza # ls
bat # cat
delta # diff viewer (also wired into git below)
dust # du
duf # df
gping # ping, with a graph
ripgrep # grep, respects .gitignore
fd # find
tldr # man, simpler
# system / process tools
htop
bottom
lsof
file
killall
unzip
tmux
wget
# network
dig
mtr
# text / data
jq
hexyl
tinyxxd
b3sum
typos
# media (handy from a shell, lightweight enough to be universal)
imagemagick
# universal dev-adjacent
git-crypt
hyperfine
# nix
nixfmt-tree
# shell greeter (invoked from fish's interactiveShellInit)
pfetch-rs
];
# Git: mechanical config + identity lives here so `git` works out of the box
# on every machine. Signing is opt-in via lib.mkDefault so machines without
# my GPG key can override `signing.signByDefault = false` without fighting
# priority.
programs.git = {
enable = true;
package = pkgs.git;
lfs.enable = true;
ignores = [ ".sisyphus" ];
settings = {
init.defaultBranch = "main";
push.autoSetupRemote = true;
user = {
name = "Simon Gardling";
email = "titaniumtown@proton.me";
};
};
signing = {
format = "openpgp";
key = lib.mkDefault "9AB28AC10ECE533D";
signByDefault = lib.mkDefault true;
};
};
# Pretty diff viewer, wired into git.
programs.delta = {
enable = true;
enableGitIntegration = true;
};
}