mirror of
https://github.com/itme-brain/nixos.git
synced 2026-03-23 16:29:42 -04:00
added clean recipe
This commit is contained in:
parent
60bf487552
commit
d076c79cb9
1 changed files with 16 additions and 1 deletions
17
justfile
17
justfile
|
|
@ -4,6 +4,21 @@ SYSTEM := "$(echo $HOSTNAME)"
|
||||||
default:
|
default:
|
||||||
@just --list
|
@just --list
|
||||||
|
|
||||||
|
# Clean up build artifacts
|
||||||
|
clean:
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
echo "Cleaning build artifacts"
|
||||||
|
if [ -d result ]; then
|
||||||
|
echo "Removing result directory..."
|
||||||
|
rm ./result;
|
||||||
|
fi
|
||||||
|
if ls *.qcow2 1> /dev/null 2>&1; then
|
||||||
|
echo "Removing virtual disk..."
|
||||||
|
rm ./*.qcow2;
|
||||||
|
fi
|
||||||
|
echo "All clean!"
|
||||||
|
|
||||||
# Output what derivations will be built
|
# Output what derivations will be built
|
||||||
test SYSTEM TYPE="nix":
|
test SYSTEM TYPE="nix":
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
@ -39,7 +54,7 @@ test SYSTEM TYPE="nix":
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Build the nix expression and hydrate the results directory - pass VM flag to build a VM
|
# Build the nix expression and hydrate the results directory - pass VM flag to build a VM
|
||||||
build SYSTEM TYPE="nix":
|
make SYSTEM TYPE="nix":
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
case "{{TYPE}}" in
|
case "{{TYPE}}" in
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue