If you're making a lot of changes, skip the cache by adding the --refresh flag.
sudo nixos-rebuild switch --flake github:a-h/nixos#hetzner-dedicated-x86_64 --refreshsudo nixos-rebuild switch --flake github:a-h/nixos#hetzner-builder-x86_64 --refreshsudo nixos-rebuild switch --flake github:a-h/nixos#builder-aarch64
sudo nixos-rebuild switch --flake .#nixos-aarch64See https://ryan.himmelwright.net/post/utmctl-nearly-headless-vms/
utmctl start aarch64
utmctl start aarch64Inputs: ACCESS_KEY, SECRET_KEY
mc alias set minio-auserhesketh-com https://minio.auserhesketh.com $ACCESS_KEY $SECRET_KEYmc mb minio-auserhesketh-com/nix-cacheInputs: ACCESS_KEY, SECRET_KEY
mc admin user add minio-auserhesketh-com $ACCESS_KEY $SECRET_KEYInputs: ACCESS_KEY
# Create policy.
mc admin policy create minio-auserhesketh-com nix-cache-read-write-policy ./minio/nix-cache-read-write-policy.json
# Create group and attach policy.
mc admin group add minio-auserhesketh-com nix-cache-read-write $ACCESS_KEY
mc admin policy attach minio-auserhesketh-com nix-cache-read-write-policy --group=nix-cache-read-writeInputs: ACCESS_KEY
# Create policy.
mc admin policy create minio-auserhesketh-com nix-cache-read-policy ./minio/nix-cache-read-policy.json
# Create group and attach policy.
mc admin group add minio-auserhesketh-com nix-cache-read $ACCESS_KEY
mc admin policy attach minio-auserhesketh-com nix-cache-read-policy --group=nix-cache-readInputs: ACCESS_KEY, SECRET_KEY
To set up the AWS CLI to use your new MinIO server, you must configure the AWS CLI.
cat <<EOF > ~/.aws/config
[profile minio-auserhesketh-com]
region = us-east-1
output = json
# The endpoint is the URL of the MinIO server, but this is, sadly, ignored by the Nix tools, and you have to specify it in the store path.
endpoint_url = https://minio.auserhesketh.com
EOF
cat <<EOF > ~/.aws/credentials
[minio-auserhesketh-com]
aws_access_key_id=$ACCESS_KEY
aws_secret_access_key=$SECRET_KEY
EOFWith the AWS CLI configured to use the MinIO server, you can list the buckets using the AWS CLI instead.
aws s3 --profile minio-auserhesketh-com lsaws s3 --profile minio-auserhesketh-com ls s3://nix-cacheaws s3 --profile minio-auserhesketh-com cp ./README.md s3://nix-cache/README.mdAdd -vvvv for verbose output.
nix store info --store 's3://nix-cache?profile=minio-auserhesketh-com&endpoint=minio.auserhesketh.com'Add -vvvv for verbose output.
pass minio.auserhesketh.com/nix-store-private-key.pem > ~/nix-store-private-key.pem
nix copy --to 's3://nix-cache?profile=minio-auserhesketh-com&endpoint=minio.auserhesketh.com' .#devShells.x86_64-linux.default
nix store sign -k ~/nix-store-private-key.pem --store 's3://nix-cache?profile=minio-auserhesketh-com&endpoint=minio.auserhesketh.com' .#devShells.x86_64-linux.defaultIt's also possible to copy nix copy --to 's3://nix-cache?profile=minio-auserhesketh-com&endpoint=minio.auserhesketh.com' .#devShells.x86_64-linux.default and then sign the store path.