Files
nix-config-ryan4yin/modules/nixos/base/packages.nix
T
Ryan Yin 52573278bd feat(base): install python313 on every NixOS host
Hosts without Home Manager (aquamarine, the VM hosts, k3s guests) had no
interpreter. The system profile is separate from the per-user one, so desktops
keep their Home Manager copy in PATH.

Assisted-by: DeepSeek Harness 0.2.1-rc.2 (deepseek-flash)
2026-10-20 00:20:12 +08:00

66 lines
1.7 KiB
Nix

{
lib,
config,
pkgs,
...
}:
let
inherit (config.modules) hardwareTools debugTools;
in
{
options.modules.hardwareTools.enable =
lib.mkEnableOption ''
Basic hardware and disk introspection tools (lm_sensors, pciutils,
usbutils, dmidecode, parted, smartmontools, nvme-cli).
On by default for physical hosts; MicroVM guests turn it off since they
share the host's store and cannot use any of it.
''
// {
default = true;
};
options.modules.debugTools.enable = lib.mkEnableOption ''
Tracing and benchmarking tools (strace, bpftrace, sysstat, iotop-c,
sysbench and the BCC tools).
Off by default: opt in on hosts where you actually profile with them
(currently idols-ai).
'';
config = {
environment.systemPackages =
with pkgs;
[
# broadly useful on every host
lsof # list open files
psmisc # killall/pstree/prtstat/fuser/...
ethtool
pv # pipe view
# System-wide interpreter; Home Manager's python313 on desktops is a separate profile.
python313
]
++ lib.optionals hardwareTools.enable [
lm_sensors # `sensors` command
pciutils # lspci
usbutils # lsusb
dmidecode # SMBIOS/DMI hardware info (from the BIOS)
parted
smartmontools # smartctl -a /dev/nvme0n1
nvme-cli
]
++ lib.optionals debugTools.enable [
strace # system call tracing
bpftrace # eBPF tracing, https://github.com/bpftrace/bpftrace
sysstat
iotop-c
sysbench
];
# BCC - tools for BPF-based IO/network analysis/monitoring
# https://github.com/iovisor/bcc
programs.bcc.enable = debugTools.enable;
};
}