From 2ff7098d782bd59097ade38633225446cc3d993a Mon Sep 17 00:00:00 2001 From: s0me1newithhand7s Date: Fri, 29 May 2026 16:19:02 +0300 Subject: [PATCH] chore(hand7s): package cleaning Signed-off-by: s0me1newithhand7s --- hand7s/home/packages.nix | 78 ++++++++++++++++++++++++++++++++++++---- 1 file changed, 72 insertions(+), 6 deletions(-) diff --git a/hand7s/home/packages.nix b/hand7s/home/packages.nix index d0fd64d..f9e2fca 100644 --- a/hand7s/home/packages.nix +++ b/hand7s/home/packages.nix @@ -1,33 +1,99 @@ {pkgs, ...}: { home = { packages = with pkgs; [ - fd gh sd xh + viu + tdf + epr dua nvd - tlrc dust + ouch sops + grex rsync + hexyl procs sshfs sbctl gping comma - trippy - bottom - ripgrep kubectl gitoxide + step-cli + hyperfine deploy-rs btop-rocm bubblewrap - ripgrep-all + microfetch nixos-anywhere wireguard-tools nix-output-monitor + + ( + pkgs.writeShellApplication { + name = "safe-open"; + runtimeInputs = with pkgs; [ + cryptsetup + btrfs-progs + uutils-coreutils-noprefix + ]; + + text = '' + if [ "$(id -u)" -ne 0 ]; then + printf "use sudo;" >&2 + exit 1 + fi + + if [ ! -b /dev/sda ]; then + echo "no safe;" >&2 + exit 1 + fi + + cryptsetup luksOpen /dev/sda test_safe + mkdir -p /tmp/pico_safe + mount -o compress=zstd:3,noatime,ssd /dev/mapper/test_safe /tmp/pico_safe + chown -R :wheel /tmp/pico_safe + + exit 0 + ''; + } + ) + + ( + pkgs.writeShellApplication { + name = "safe-close"; + runtimeInputs = with pkgs; [ + cryptsetup + btrfs-progs + uutils-coreutils-noprefix + uutils-util-linux + ]; + + text = '' + if [ "$(id -u)" -ne 0 ]; then + printf "use sudo;" >&2 + exit 1 + fi + + if mountpoint -q /tmp/pico_safe; then + umount /tmp/pico_safe + printf "umounted" + fi + + if [ -b /dev/mapper/test_safe ]; then + cryptsetup luksClose test_safe + exit 0 + else + echo "no safe!" + fi + + exit 0 + ''; + } + ) ]; }; }