diff --git a/hosts/_common/configuration.nix b/hosts/_common/configuration.nix index 080f8dc..4cdd5c8 100644 --- a/hosts/_common/configuration.nix +++ b/hosts/_common/configuration.nix @@ -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 diff --git a/hosts/_common/shellInit.sh b/hosts/_common/shellInit.sh index 7ff64c7..3a7277e 100644 --- a/hosts/_common/shellInit.sh +++ b/hosts/_common/shellInit.sh @@ -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/.*: //' diff --git a/publics/nix2git.pub b/publics/nix2git.pub deleted file mode 100644 index e665e98..0000000 --- a/publics/nix2git.pub +++ /dev/null @@ -1,2 +0,0 @@ -ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIAKFIuMe7qoUDI/LxhrrYmIDbH0xUwj1wm5vVulApLPV nix2github -