script stuff
This commit is contained in:
@@ -77,6 +77,9 @@ in
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
if [ -d .git ]; then
|
if [ -d .git ]; then
|
||||||
git pull || echo "Warning: Could not pull latest changes"
|
git pull || echo "Warning: Could not pull latest changes"
|
||||||
|
git stash
|
||||||
|
git pull || echo "Warning: Could not pull latest changes after stash"
|
||||||
|
return 1
|
||||||
fi
|
fi
|
||||||
echo "Updating flake at $(date)"
|
echo "Updating flake at $(date)"
|
||||||
if nix flake update; then
|
if nix flake update; then
|
||||||
@@ -85,34 +88,34 @@ in
|
|||||||
echo "failed to update flake $(date)"
|
echo "failed to update flake $(date)"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if NIXPKGS_ALLOW_UNFREE=1 nix flake check --impure; then
|
if nix flake check; then
|
||||||
echo "flake checked successfully at $(date)"
|
echo "flake checked successfully at $(date)"
|
||||||
else
|
else
|
||||||
echo "flake check failed at $(date)"
|
echo "flake check failed at $(date)"
|
||||||
git reset --hard
|
git reset --hard
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if nh os build --hostname=nas; then
|
if nh os build --hostname=jallen-nas --out-link=result-nas; then
|
||||||
echo "nas built successfully at $(date)"
|
echo "nas built successfully at $(date)"
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
if nh os build --hostname=nuc; then
|
if nh os build --hostname=nuc-nixos --out-link=result-nuc; then
|
||||||
echo "nuc built successfully at $(date)"
|
echo "nuc built successfully at $(date)"
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
if nh os build --hostname=desktop; then
|
if nh os build --hostname=matt-nixos --out-link=result-desktop; then
|
||||||
echo "desktop built successfully at $(date)"
|
echo "desktop built successfully at $(date)"
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
if nh os build --hostname=steamdeck; then
|
if nh os build --hostname=steamdeck --out-link=result-steamdeck; then
|
||||||
echo "steamdeck built successfully at $(date)"
|
echo "steamdeck built successfully at $(date)"
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
if nh os build --hostname=pi4; then
|
if nh os build --hostname=pi4 --out-link=result-pi4; then
|
||||||
echo "pi4 built successfully at $(date)"
|
echo "pi4 built successfully at $(date)"
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
if nh os build --hostname=pi5; then
|
if nh os build --hostname=pi5 --out-link=result-pi5; then
|
||||||
echo "pi5 built successfully at $(date)"
|
echo "pi5 built successfully at $(date)"
|
||||||
fi;
|
fi;
|
||||||
'';
|
'';
|
||||||
|
|||||||
Reference in New Issue
Block a user