albatros/hcl/nixcache/warmup.sh
2023-03-24 17:04:19 +01:00

11 lines
225 B
Bash

#!/usr/bin/env bash
set -euxo pipefail
if [[ ! -f /mnt/nix/nixos-22.11 ]]; then
rm -rf /mnt/nix/*
cp -r /nix/* /mnt/nix/
touch /mnt/nix/nixos-22.11
echo "initialized cache"
else
echo "cache already initialized"
fi