speed tests

This commit is contained in:
RingOfStorms (Josh) 2024-10-04 23:18:35 -05:00
parent 8d32c89971
commit 52bbb90673
3 changed files with 41 additions and 3 deletions

View file

@ -1,4 +1,9 @@
{ pkgs, settings, ... }:
{
lib,
pkgs,
settings,
...
}:
let
defaultLocal = "en_US.UTF-8";
in
@ -18,6 +23,23 @@ in
"flakes"
];
# allow mounting ntfs filesystems
boot.supportedFilesystems = [ "ntfs" ];
# Fallback quickly if substituters are not available.
nix.settings.connect-timeout = 5;
nix.settings.download-attempts = 3;
# The default at 10 is rarely enough.
nix.settings.log-lines = 50;
# Avoid disk full issues
nix.settings.max-free = (3000 * 1024 * 1024);
nix.settings.min-free = (1000 * 1024 * 1024);
# Avoid copying unnecessary stuff over SSH
nix.settings.builders-use-substitutes = true;
# Slower but mroe robust during crash TODO enable once we upgrade nix
# nix.settings.fsync-store-paths = true;
# nix.settings.fsync-metadata = true;
# ==========
# Common
# ==========
@ -77,6 +99,8 @@ in
ripgrep
lsof
killall
hdparm
speedtest-cli
# TODO keep in common or move to specific machines, I want this for my pocket 3 video KDM module but I use ffmpeg on most machines anyways?
ffmpeg-full

View file

@ -35,6 +35,22 @@ mail_clear() {
: > /var/mail/$USER
}
speedtest_fs () {
dir=$(pwd)
drive=$(df -h ${dir} | awk 'NR==2 {print $1}')
echo Testing read speeds on drive ${drive}
sudo hdparm -Tt ${drive}
test_file=$(date +%u%m%d)
test_file="${dir}/speedtest_fs_${test_file}"
echo
echo Testing write speeds into test file: ${test_file}
dd if=/dev/zero of=${test_file} bs=8k count=10k; rm -f ${test_file}
}
speedtest_internet () {
speedtest-cli
}
# git
getdefault () {
git remote show origin | grep "HEAD branch" | sed 's/.*: //'

View file

@ -1,2 +0,0 @@
ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAKFIuMe7qoUDI/LxhrrYmIDbH0xUwj1wm5vVulApLPV nix2github