baremetal-builders: detect percent_filled for the correct partition
This commit is contained in:
parent
dd81b78f7a
commit
4e2d21930f
12
flake.lock
12
flake.lock
|
@ -64,13 +64,13 @@
|
||||||
"treefmt-nix": "treefmt-nix"
|
"treefmt-nix": "treefmt-nix"
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1722190692,
|
"lastModified": 1722339507,
|
||||||
"narHash": "sha256-meyufek9SElo8iAHMs5ii55Eg7kdJxjMxAkYDvnDRpo=",
|
"narHash": "sha256-CdkQx6l0CuPtU9tMw3u73PAMhj+8YUAlTUVyrTCZas8=",
|
||||||
"ref": "refs/heads/non-flakes",
|
"ref": "15963fa0e687cb39660aadf147402c955d671029",
|
||||||
"rev": "8f5ad30cb7df5afbc4df1370a79bf3825c60f8b1",
|
"rev": "15963fa0e687cb39660aadf147402c955d671029",
|
||||||
"revCount": 291,
|
"revCount": 292,
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.lix.systems/lix-project/buildbot-nix.git"
|
"url": "file:///home/yuka/proj/buildbot-nix"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"ref": "refs/heads/non-flakes",
|
"ref": "refs/heads/non-flakes",
|
||||||
|
|
|
@ -153,7 +153,7 @@ in
|
||||||
description = "Nix Garbage Collector";
|
description = "Nix Garbage Collector";
|
||||||
script = ''
|
script = ''
|
||||||
while : ; do
|
while : ; do
|
||||||
percent_filled=$(($(stat -f --format="100-(100*%a/%b)" /)))
|
percent_filled=$(($(stat -f --format="100-(100*%a/%b)" /mnt)))
|
||||||
if [ "$percent_filled" -gt "85" ]; then
|
if [ "$percent_filled" -gt "85" ]; then
|
||||||
${config.nix.package.out}/bin/nix-store --gc --max-freed 100G --store /mnt
|
${config.nix.package.out}/bin/nix-store --gc --max-freed 100G --store /mnt
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue