From ba29ddc66ad64970adc4d2a1d951cb99b9c246f3 Mon Sep 17 00:00:00 2001 From: "RingOfStorms (Joshua Bell)" Date: Sun, 28 Dec 2025 20:17:43 -0600 Subject: [PATCH 1/9] update opencode --- flakes/opencode/flake.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/flakes/opencode/flake.lock b/flakes/opencode/flake.lock index 35b16e4d..d22dd2b4 100644 --- a/flakes/opencode/flake.lock +++ b/flakes/opencode/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1766125104, - "narHash": "sha256-l/YGrEpLromL4viUo5GmFH3K5M1j0Mb9O+LiaeCPWEM=", + "lastModified": 1766840161, + "narHash": "sha256-Ss/LHpJJsng8vz1Pe33RSGIWUOcqM1fjrehjUkdrWio=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "7d853e518814cca2a657b72eeba67ae20ebf7059", + "rev": "3edc4a30ed3903fdf6f90c837f961fa6b49582d1", "type": "github" }, "original": { @@ -21,11 +21,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1766426038, - "narHash": "sha256-3TxsJjL5M83q9nOa4ls6rWfbECYUE6llzBAgqCYQml8=", + "lastModified": 1766973473, + "narHash": "sha256-QGr2U1y5ee/GjDhJnihdDjn9bNBjm/hg5Pm/rFefQzo=", "owner": "sst", "repo": "opencode", - "rev": "6baee0791f48bcf32eef1e199d0cadca57772b9b", + "rev": "76880dce0d67998c03f9dbb162f4f91f1a762a47", "type": "github" }, "original": { From 1197602d462b715a6aafe6aa5b162bd1f2a06b5a Mon Sep 17 00:00:00 2001 From: "RingOfStorms (Joshua Bell)" Date: Sun, 28 Dec 2025 22:07:09 -0600 Subject: [PATCH 2/9] add nfs-utils --- hosts/lio/flake.lock | 8 ++++---- hosts/lio/flake.nix | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hosts/lio/flake.lock b/hosts/lio/flake.lock index 04973b85..85d7d43f 100644 --- a/hosts/lio/flake.lock +++ b/hosts/lio/flake.lock @@ -1237,11 +1237,11 @@ }, "locked": { "dir": "flakes/opencode", - "lastModified": 1766961967, - "narHash": "sha256-ccLRTjpQ3tqvNMMhCn02+WS74KE0i8bYLI/Jh4GdoiQ=", + "lastModified": 1766965969, + "narHash": "sha256-uKxbAXX9bLzl7j4D0REN+JNntINdk/e/ry5a6hSqW0I=", "ref": "refs/heads/master", - "rev": "6b023457ec9053e748bc49ac3e28ea82e2f998d4", - "revCount": 975, + "rev": "34e37861a716ee5e3498900bc4639a715bcc4adc", + "revCount": 981, "type": "git", "url": "https://git.joshuabell.xyz/ringofstorms/dotfiles" }, diff --git a/hosts/lio/flake.nix b/hosts/lio/flake.nix index 7b1be4d7..6b439c84 100644 --- a/hosts/lio/flake.nix +++ b/hosts/lio/flake.nix @@ -185,6 +185,7 @@ vlang ttyd pavucontrol + nfs-utils ]; services.flatpak.packages = [ From b215dc922f80e1661c88da28423f3ea8ca2f638d Mon Sep 17 00:00:00 2001 From: "RingOfStorms (Joshua Bell)" Date: Mon, 29 Dec 2025 08:59:19 -0600 Subject: [PATCH 3/9] no fail data mount so we dont fail on startup, no more boot fsk takes too long --- hosts/h002/hardware-configuration.nix | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hosts/h002/hardware-configuration.nix b/hosts/h002/hardware-configuration.nix index cb8dfd17..3bf05b3f 100644 --- a/hosts/h002/hardware-configuration.nix +++ b/hosts/h002/hardware-configuration.nix @@ -46,9 +46,10 @@ fsType = "bcachefs"; options = [ "defaults" - "compression=zstd" - "fsck" - "fix_errors" + # "fsck" + # "fix_errors" + "x-systemd.device-timeout=600s" + "nofail" ]; }; From 226ef7bfa8055c224d6bbfe13f4913239d9d1607 Mon Sep 17 00:00:00 2001 From: "RingOfStorms (Joshua Bell)" Date: Mon, 29 Dec 2025 11:35:09 -0600 Subject: [PATCH 4/9] update opencode --- flakes/opencode/flake.lock | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/flakes/opencode/flake.lock b/flakes/opencode/flake.lock index d22dd2b4..c41ca50b 100644 --- a/flakes/opencode/flake.lock +++ b/flakes/opencode/flake.lock @@ -2,11 +2,11 @@ "nodes": { "nixpkgs": { "locked": { - "lastModified": 1766840161, - "narHash": "sha256-Ss/LHpJJsng8vz1Pe33RSGIWUOcqM1fjrehjUkdrWio=", + "lastModified": 1766870016, + "narHash": "sha256-fHmxAesa6XNqnIkcS6+nIHuEmgd/iZSP/VXxweiEuQw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "3edc4a30ed3903fdf6f90c837f961fa6b49582d1", + "rev": "5c2bc52fb9f8c264ed6c93bd20afa2ff5e763dce", "type": "github" }, "original": { @@ -21,11 +21,11 @@ "nixpkgs": "nixpkgs" }, "locked": { - "lastModified": 1766973473, - "narHash": "sha256-QGr2U1y5ee/GjDhJnihdDjn9bNBjm/hg5Pm/rFefQzo=", + "lastModified": 1767028968, + "narHash": "sha256-Z6Jk9Ee3+KHaQf7V/zbHHgotZ0gQA5Mtqpzs8PAQmBY=", "owner": "sst", "repo": "opencode", - "rev": "76880dce0d67998c03f9dbb162f4f91f1a762a47", + "rev": "b7ce46f7a12e68283d6588c33aaf972426ddd65e", "type": "github" }, "original": { From bc15c11d939ec4de021fc6a097c48f2759befbba Mon Sep 17 00:00:00 2001 From: "RingOfStorms (Joshua Bell)" Date: Mon, 29 Dec 2025 20:18:16 +0000 Subject: [PATCH 5/9] fix dns --- hosts/h003/mods/networking.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hosts/h003/mods/networking.nix b/hosts/h003/mods/networking.nix index 2e6c8fa7..cd97830b 100644 --- a/hosts/h003/mods/networking.nix +++ b/hosts/h003/mods/networking.nix @@ -197,7 +197,7 @@ # Static DHCP reservations dhcp-host = [ "00:be:43:b9:f4:e0,H001,10.12.14.10" - "54:04:a6:32:d1:71,H002,10.12.14.10" + "54:04:a6:32:d1:71,H002,10.12.14.183" "c8:c9:a3:2b:7b:19,PRUSA-MK4,10.12.14.21" "24:e8:53:73:a3:c6,LGWEBOSTV,10.12.14.30" "2c:cf:67:6a:45:47,HOMEASSISTANT,10.12.14.22" From 29ad7a1b1a82194c7a2a2c8546ba2d2fb725ebf1 Mon Sep 17 00:00:00 2001 From: "RingOfStorms (Joshua Bell)" Date: Mon, 29 Dec 2025 14:35:51 -0600 Subject: [PATCH 6/9] better filesystem test --- .../common/nix_modules/essentials/default.nix | 1 + .../nix_modules/essentials/unix_utils.func.sh | 66 ++++++++++++++++--- 2 files changed, 59 insertions(+), 8 deletions(-) diff --git a/flakes/common/nix_modules/essentials/default.nix b/flakes/common/nix_modules/essentials/default.nix index 7bc19c55..e0ff89ea 100644 --- a/flakes/common/nix_modules/essentials/default.nix +++ b/flakes/common/nix_modules/essentials/default.nix @@ -30,6 +30,7 @@ with lib; killall speedtest-cli parted + fio ]; environment.shellAliases = { diff --git a/flakes/common/nix_modules/essentials/unix_utils.func.sh b/flakes/common/nix_modules/essentials/unix_utils.func.sh index 3120f6d2..2d48b401 100644 --- a/flakes/common/nix_modules/essentials/unix_utils.func.sh +++ b/flakes/common/nix_modules/essentials/unix_utils.func.sh @@ -48,16 +48,66 @@ mail_clear() { : > /var/mail/$USER } -speedtest_fs () { +peedtest_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}" + drive=$(df -h "${dir}" | awk 'NR==2 {print $1}') + echo "Testing filesystem on: ${dir}" + echo "Underlying device: ${drive}" 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} + + test_file="${dir}/speedtest_fs_$(date +%u%m%d).fio" + file_size=1G # size of the test file + runtime=5 # seconds per test + + cleanup() { + if [ -n "${test_file:-}" ] && [ -f "${test_file}" ]; then + echo + echo "Cleaning up test file: ${test_file}" + rm -f "${test_file}" + fi + } + + # Ensure cleanup on normal exit, Ctrl+C, etc. + trap cleanup EXIT INT TERM + + echo "Creating test file (${file_size}) at: ${test_file}" + fio --name=precreate \ + --filename="${test_file}" \ + --rw=write \ + --bs=1M \ + --size="${file_size}" \ + --iodepth=16 \ + --direct=1 \ + --numjobs=1 \ + --group_reporting >/dev/null 2>&1 + + echo + echo "=== Sequential write test (${runtime}s) ===" + fio --name=seqwrite \ + --filename="${test_file}" \ + --rw=write \ + --bs=1M \ + --size="${file_size}" \ + --iodepth=16 \ + --direct=1 \ + --numjobs=1 \ + --time_based \ + --runtime="${runtime}" \ + --group_reporting + + echo + echo "=== Sequential read test (${runtime}s) ===" + fio --name=seqread \ + --filename="${test_file}" \ + --rw=read \ + --bs=1M \ + --size="${file_size}" \ + --iodepth=16 \ + --direct=1 \ + --numjobs=1 \ + --time_based \ + --runtime="${runtime}" \ + --group_reporting } speedtest_internet () { From 677c5a2c4eb222cca9b740f10463c638fca3ada6 Mon Sep 17 00:00:00 2001 From: "RingOfStorms (Joshua Bell)" Date: Mon, 29 Dec 2025 14:40:10 -0600 Subject: [PATCH 7/9] update speedtest fs command --- .../common/nix_modules/essentials/default.nix | 2 ++ .../nix_modules/essentials/unix_utils.func.sh | 19 ++++++++++--- hosts/lio/flake.lock | 28 +++++++++---------- 3 files changed, 31 insertions(+), 18 deletions(-) diff --git a/flakes/common/nix_modules/essentials/default.nix b/flakes/common/nix_modules/essentials/default.nix index e0ff89ea..12dcbf01 100644 --- a/flakes/common/nix_modules/essentials/default.nix +++ b/flakes/common/nix_modules/essentials/default.nix @@ -56,6 +56,8 @@ with lib; # ripgrep rg = "rg --no-ignore"; rgf = "rg --files --glob '!/nix/store/**' 2>/dev/null | rg"; + + speedtest_internet = "speedtest-cli"; }; environment.shellInit = lib.concatStringsSep "\n\n" [ diff --git a/flakes/common/nix_modules/essentials/unix_utils.func.sh b/flakes/common/nix_modules/essentials/unix_utils.func.sh index 2d48b401..a6c4907f 100644 --- a/flakes/common/nix_modules/essentials/unix_utils.func.sh +++ b/flakes/common/nix_modules/essentials/unix_utils.func.sh @@ -48,7 +48,7 @@ mail_clear() { : > /var/mail/$USER } -peedtest_fs () { +speedtest_fs () { dir=$(pwd) drive=$(df -h "${dir}" | awk 'NR==2 {print $1}') echo "Testing filesystem on: ${dir}" @@ -108,8 +108,19 @@ peedtest_fs () { --time_based \ --runtime="${runtime}" \ --group_reporting -} -speedtest_internet () { - speedtest-cli + echo + echo "=== Random read/write test (${runtime}s, 70% reads, 4k blocks) ===" + fio --name=randrw \ + --filename="${test_file}" \ + --rw=randrw \ + --rwmixread=70 \ + --bs=4k \ + --size="${file_size}" \ + --iodepth=32 \ + --direct=1 \ + --numjobs=4 \ + --time_based \ + --runtime="${runtime}" \ + --group_reporting } diff --git a/hosts/lio/flake.lock b/hosts/lio/flake.lock index 85d7d43f..2cdc3a7c 100644 --- a/hosts/lio/flake.lock +++ b/hosts/lio/flake.lock @@ -64,11 +64,11 @@ "common": { "locked": { "dir": "flakes/common", - "lastModified": 1766961967, - "narHash": "sha256-ccLRTjpQ3tqvNMMhCn02+WS74KE0i8bYLI/Jh4GdoiQ=", + "lastModified": 1767040555, + "narHash": "sha256-/YuefBcuLOtunUkDPUf9hj6iaLQvZjXKFgpwe9tDEdw=", "ref": "refs/heads/master", - "rev": "6b023457ec9053e748bc49ac3e28ea82e2f998d4", - "revCount": 975, + "rev": "663078098208707c9b20d762c42db5acd144e938", + "revCount": 991, "type": "git", "url": "https://git.joshuabell.xyz/ringofstorms/dotfiles" }, @@ -321,11 +321,11 @@ }, "nixpkgs_4": { "locked": { - "lastModified": 1766125104, - "narHash": "sha256-l/YGrEpLromL4viUo5GmFH3K5M1j0Mb9O+LiaeCPWEM=", + "lastModified": 1766870016, + "narHash": "sha256-fHmxAesa6XNqnIkcS6+nIHuEmgd/iZSP/VXxweiEuQw=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "7d853e518814cca2a657b72eeba67ae20ebf7059", + "rev": "5c2bc52fb9f8c264ed6c93bd20afa2ff5e763dce", "type": "github" }, "original": { @@ -1237,11 +1237,11 @@ }, "locked": { "dir": "flakes/opencode", - "lastModified": 1766965969, - "narHash": "sha256-uKxbAXX9bLzl7j4D0REN+JNntINdk/e/ry5a6hSqW0I=", + "lastModified": 1767029710, + "narHash": "sha256-MqilsCw9R5Rnq6qFBVctn/WtYO6vA8Rlt14tgKiIC/s=", "ref": "refs/heads/master", - "rev": "34e37861a716ee5e3498900bc4639a715bcc4adc", - "revCount": 981, + "rev": "3f8232e8f98713bc74c8f4ace0694cdc19ae2d3d", + "revCount": 988, "type": "git", "url": "https://git.joshuabell.xyz/ringofstorms/dotfiles" }, @@ -1256,11 +1256,11 @@ "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1766426038, - "narHash": "sha256-3TxsJjL5M83q9nOa4ls6rWfbECYUE6llzBAgqCYQml8=", + "lastModified": 1767028968, + "narHash": "sha256-Z6Jk9Ee3+KHaQf7V/zbHHgotZ0gQA5Mtqpzs8PAQmBY=", "owner": "sst", "repo": "opencode", - "rev": "6baee0791f48bcf32eef1e199d0cadca57772b9b", + "rev": "b7ce46f7a12e68283d6588c33aaf972426ddd65e", "type": "github" }, "original": { From d4f62bef186fd1a16510854754f5b328c3e4cab8 Mon Sep 17 00:00:00 2001 From: "RingOfStorms (Joshua Bell)" Date: Mon, 29 Dec 2025 14:42:39 -0600 Subject: [PATCH 8/9] update lio essentials --- hosts/lio/flake.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hosts/lio/flake.lock b/hosts/lio/flake.lock index 2cdc3a7c..d812b6bd 100644 --- a/hosts/lio/flake.lock +++ b/hosts/lio/flake.lock @@ -64,11 +64,11 @@ "common": { "locked": { "dir": "flakes/common", - "lastModified": 1767040555, - "narHash": "sha256-/YuefBcuLOtunUkDPUf9hj6iaLQvZjXKFgpwe9tDEdw=", + "lastModified": 1767040810, + "narHash": "sha256-7ylVqMemlv1lAT05ymJIrQRhDxwC84ncDheJWbdMkGw=", "ref": "refs/heads/master", - "rev": "663078098208707c9b20d762c42db5acd144e938", - "revCount": 991, + "rev": "677c5a2c4eb222cca9b740f10463c638fca3ada6", + "revCount": 992, "type": "git", "url": "https://git.joshuabell.xyz/ringofstorms/dotfiles" }, From 57b53fa3fd299a83c571002dac61bde29d09a9da Mon Sep 17 00:00:00 2001 From: "RingOfStorms (Joshua Bell)" Date: Mon, 29 Dec 2025 14:44:06 -0600 Subject: [PATCH 9/9] expose NFS on local network as well --- hosts/h002/flake.lock | 8 +++--- hosts/h002/flake.nix | 2 +- hosts/h002/nfs-data.nix | 55 ++++++++++++++++++++++++++++++++--------- 3 files changed, 49 insertions(+), 16 deletions(-) diff --git a/hosts/h002/flake.lock b/hosts/h002/flake.lock index c90d1881..ce89d194 100644 --- a/hosts/h002/flake.lock +++ b/hosts/h002/flake.lock @@ -64,11 +64,11 @@ "common": { "locked": { "dir": "flakes/common", - "lastModified": 1766101431, - "narHash": "sha256-96UMxqqZjI9L9SEBwL3yxbJBH5NC9Gq+kgAS4GQaWqE=", + "lastModified": 1767040959, + "narHash": "sha256-YZyIBq1N0iRMN+R/LGNLmmkSmimer6MMysP032xC3C8=", "ref": "refs/heads/master", - "rev": "a5fa2f1e63efc1111940bf2c636e4043381886cd", - "revCount": 959, + "rev": "d4f62bef186fd1a16510854754f5b328c3e4cab8", + "revCount": 993, "type": "git", "url": "https://git.joshuabell.xyz/ringofstorms/dotfiles" }, diff --git a/hosts/h002/flake.nix b/hosts/h002/flake.nix index 39db9da3..75620a84 100644 --- a/hosts/h002/flake.nix +++ b/hosts/h002/flake.nix @@ -66,7 +66,7 @@ token = "11714da6-fd2e-436a-8b83-e0e07ba33a95"; }; services.beszel.agent.environment = { - EXTRA_FILESYSTEMS = "sdb__Data"; + EXTRA_FILESYSTEMS = "/data__Data"; }; }) diff --git a/hosts/h002/nfs-data.nix b/hosts/h002/nfs-data.nix index f796c878..79eac45b 100644 --- a/hosts/h002/nfs-data.nix +++ b/hosts/h002/nfs-data.nix @@ -1,13 +1,46 @@ -{ pkgs, ... }: { - services.nfs.server = { - enable = true; - exports = '' - /data 100.64.0.0/10(rw,sync,no_subtree_check,fsid=0,crossmnt) - ''; - }; + pkgs, + config, + lib, + ... +}: +lib.mkMerge [ + ({ + services.nfs.server = { + enable = true; + exports = '' + /data 100.64.0.0/10(rw,sync,no_subtree_check,fsid=0,crossmnt) + /data 10.12.14.0/10(rw,sync,no_subtree_check,fsid=0,crossmnt) + ''; + }; - environment.systemPackages = [ - pkgs.nfs-utils - ]; -} + environment.systemPackages = [ + pkgs.nfs-utils + ]; + }) + # Open ports and expose so local network works + (lib.mkIf config.networking.firewall.enable { + services.rpcbind.enable = true; + services.nfs.server.lockdPort = 32803; + services.nfs.server.mountdPort = 892; + services.nfs.server.statdPort = 662; + + networking.firewall = { + allowedTCPPorts = [ + 2049 + 111 + 892 + 32803 + 662 + ]; + allowedUDPPorts = [ + 2049 + 111 + 892 + 32803 + 662 + ]; + }; + + }) +]