This commit is contained in:
Tao Tien 2025-12-02 17:33:57 -08:00
parent 78c1198d90
commit fada7e988b
4 changed files with 24 additions and 6 deletions

View file

@ -9,10 +9,10 @@ def ns [...packages: string] {
# nix search nixpkgs $package
# }
def --wrapped rebuild [subcommand, ...rest] {
def --wrapped rebuild [--force, subcommand, ...rest] {
if not (
df -h | detect columns --guess | where "Mounted on" == "/" or "Mounted on" == "/boot" | get Use% | each {parse "{usage}%" | get usage | into int} | flatten | all {$in < 99}
) {
) and not $force {
print "not enough disk space!"
return false
}