add speedtest filesystem helper
This commit is contained in:
parent
222de09642
commit
ea9340a612
2 changed files with 17 additions and 4 deletions
8
utilities/nixos-installers/flake.lock
generated
8
utilities/nixos-installers/flake.lock
generated
|
|
@ -982,16 +982,16 @@
|
||||||
},
|
},
|
||||||
"stable": {
|
"stable": {
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1764939437,
|
"lastModified": 1765838191,
|
||||||
"narHash": "sha256-4TLFHUwXraw9Df5mXC/vCrJgb50CRr3CzUzF0Mn3CII=",
|
"narHash": "sha256-m5KWt1nOm76ILk/JSCxBM4MfK3rYY7Wq9/TZIIeGnT8=",
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"rev": "00d2457e2f608b4be6fe8b470b0a36816324b0ae",
|
"rev": "c6f52ebd45e5925c188d1a20119978aa4ffd5ef6",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "nixos",
|
"owner": "nixos",
|
||||||
"ref": "nixos-25.05",
|
"ref": "nixos-25.11",
|
||||||
"repo": "nixpkgs",
|
"repo": "nixpkgs",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
# Build a NixOS system that is an installation ISO with SSH enabled and bcachefs
|
# Build a NixOS system that is an installation ISO with SSH enabled and bcachefs
|
||||||
|
# nix build .\#packages.x86_64-linux.iso-minimal-stable
|
||||||
minimal =
|
minimal =
|
||||||
{ nixpkgs, system }:
|
{ nixpkgs, system }:
|
||||||
nixpkgs.lib.nixosSystem {
|
nixpkgs.lib.nixosSystem {
|
||||||
|
|
@ -50,6 +51,18 @@
|
||||||
# Required as a workaround for bug
|
# Required as a workaround for bug
|
||||||
# https://github.com/NixOS/nixpkgs/issues/32279
|
# https://github.com/NixOS/nixpkgs/issues/32279
|
||||||
keyutils
|
keyutils
|
||||||
|
|
||||||
|
(pkgs.writeShellScriptBin "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}
|
||||||
|
'')
|
||||||
];
|
];
|
||||||
boot.supportedFilesystems = [ "bcachefs" ];
|
boot.supportedFilesystems = [ "bcachefs" ];
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue