build(just): add clean step

This commit is contained in:
winston 2023-11-06 07:37:52 +01:00
parent 720658399b
commit 5cc25e742a
Signed by: winston
GPG key ID: 3786770EDBC2B481

View file

@ -45,5 +45,19 @@ switch *args:
@just build {{args}} @just build {{args}}
@gum confirm && just rebuild switch {{args}} @gum confirm && just rebuild switch {{args}}
[private]
gc:
nix-collect-garbage -d
nix-store --optimise
[macos]
clean:
sudo nix-env --profile /nix/var/nix/profiles/system --delete-generations old
@just gc
[linux]
clean:
@just gc
fetch: fetch:
@nix shell nixpkgs\#onefetch nixpkgs\#scc -c sh -c "onefetch --true-color never --no-bots -d lines-of-code && scc --no-cocomo ." @nix shell nixpkgs\#onefetch nixpkgs\#scc -c sh -c "onefetch --true-color never --no-bots -d lines-of-code && scc --no-cocomo ."