Files
2025-04-30 20:47:57 +02:00

97 lines
4.1 KiB
Nix

{ config, pkgs, ... }:
{
# Enable tmux
programs.tmux = {
enable = true;
shortcut = "a";
# aggressiveResize = true; -- Disabled to be iTerm-friendly
baseIndex = 1;
newSession = true;
# Stop tmux+escape craziness.
escapeTime = 0;
# Force tmux to use /tmp for sockets (WSL2 compat)
secureSocket = false;
plugins = with pkgs; [
tmuxPlugins.better-mouse-mode
];
extraConfig = ''
# https://old.reddit.com/r/tmux/comments/mesrci/tmux_2_doesnt_seem_to_use_256_colors/
set -g default-terminal "xterm-256color"
set -ga terminal-overrides ",*256col*:Tc"
set -ga terminal-overrides '*:Ss=\E[%p1%d q:Se=\E[ q'
set-environment -g COLORTERM "truecolor"
# Mouse works as expected
set-option -g mouse on
# easy-to-remember split pane commands
bind | split-window -h -c "#{pane_current_path}"
bind - split-window -v -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
'';
};
# Setup bash
programs.bash = {
completion.enable = true;
enableLsColors = true;
shellAliases = {
set-default-boot="sudo /run/current-system/bin/switch-to-configuration boot";
full-system-clean="nix-collect-garbage -d && sudo nix-collect-garbage -d";
full-system-upgrade="sudo nixos-rebuild switch --upgrade && flatpak update -y && nix-env -u '*'";
list-system-configurations="ls -l /nix/var/nix/profiles/system-*-link";
system-rebuild="sudo nixos-rebuild switch";
system-repair="sudo nixos-rebuild switch --repair";
full-system-repair="sudo nix-store --verify --check-contents --repair";
system-upgrade-information="sudo nixos-rebuild switch --upgrade dry-build";
local-upgrade="sudo nix-channel --update nixpkgs && nix-env -u '*'";
};
};
environment.systemPackages = with pkgs; [
bash
bash-completion
bash-preexec
bashdb
bashSnippets
curl # A command line tool for transferring files with URL syntax
dnsutils # Domain name server
diffutils # Commands for showing the differences between files (diff, cmp, etc.)
git # Distributed version control system
mc # File Manager and User Shell for the GNU Project
htop # An interactive process viewer
rsync # Fast incremental file transfer utility
wget # Tool for retrieving files using HTTP, HTTPS, and FTP
nettools # A set of tools for controlling the network subsystem
ncdu # Disk usage analyzer with an ncurses interface
# nfs-utils # Linux user-space NFS utilities
pciutils # inspecting and manipulating configuration of PCI devices
pwgen # Password generator
# pwgen-secure # Secure password generation library to replace pwgen
# ranger
renameutils # A set of programs to make renaming of files faster
rename # Rename files according to a Perl rewrite expression
# smartmontools # Tools for monitoring the health of hard drives
# imagemagick # A software suite to create, edit, compose, or convert bitmap images
lshw # Provide detailed information on the hardware configuration
lsof # A tool to list open files
unrar # Utility for RAR archives
unzip # An extraction utility for archives compressed
zip # Compressor/archiver for creating and modifying zipfiles
p7zip # A new p7zip fork with additional codecs
# ---------------------------------------------------------------------
# NIX-Tools
# ---------------------------------------------------------------------
niv # Nix dependency management
nix-bash-completions # Bash completions for Nix, NixOS, and NixOps
nix-index # A files database for nixpkgs
nix-prefetch-git # nix-prefetch-git
# nixos-generators # Collection of image builders
];
}