Enable Nix and refresh linux cache volumes
Some checks failed
Build Rust / Cargo Test (push) Failing after 9s
Build Site / Next.js Build (push) Failing after 8s
Build Apple / Build App (iOS Simulator) (push) Has been cancelled
Build Apple / Build App (macOS) (push) Has been cancelled

This commit is contained in:
Conrad Kramer 2026-03-19 04:18:38 -07:00
parent 0310ef17dc
commit c47f0e6bea
5 changed files with 19 additions and 13 deletions

View file

@ -48,7 +48,8 @@ profile. The important knobs are:
- `namespace.linux_cache_*` / `namespace.macos_cache_*` persistent cache
volumes mounted into runners so Linux can keep `/nix` plus shared build
caches warm and macOS can reuse Rust toolchains, Xcode package caches, and
lane-local derived data.
lane-local derived data. If Namespace keeps reusing an older undersized cache
volume, bump the cache tag name to force a fresh allocation at the new size.
### Running locally

View file

@ -23,12 +23,12 @@ namespace:
network: ""
linux_cache_path: "/var/cache/burrow"
linux_cache_volumes:
- tag: "burrow-forgejo-linux-nix"
- tag: "burrow-forgejo-linux-nix-v2"
mount_point: "/nix"
size_gb: 60
- tag: "burrow-forgejo-linux-cache"
size_gb: 80
- tag: "burrow-forgejo-linux-cache-v2"
mount_point: "/var/cache/burrow"
size_gb: 40
size_gb: 80
macos_cache_path: "/Users/runner/.cache/burrow"
macos_cache_volumes:
- tag: "burrow-forgejo-macos-shared-v1"

View file

@ -33,12 +33,12 @@ namespace:
network: ""
linux_cache_path: "/var/cache/burrow"
linux_cache_volumes:
- tag: "burrow-forgejo-linux-nix"
- tag: "burrow-forgejo-linux-nix-v2"
mount_point: "/nix"
size_gb: 60
- tag: "burrow-forgejo-linux-cache"
size_gb: 80
- tag: "burrow-forgejo-linux-cache-v2"
mount_point: "/var/cache/burrow"
size_gb: 40
size_gb: 80
macos_cache_path: "/Users/runner/.cache/burrow"
macos_cache_volumes:
- tag: "burrow-forgejo-macos-shared-v1"

View file

@ -176,14 +176,14 @@ func (c *Config) Validate() error {
if len(c.Namespace.LinuxCacheVolumes) == 0 {
c.Namespace.LinuxCacheVolumes = []CacheVolumeConfig{
{
Tag: "burrow-forgejo-linux-nix",
Tag: "burrow-forgejo-linux-nix-v2",
MountPoint: "/nix",
SizeGb: 60,
SizeGb: 80,
},
{
Tag: "burrow-forgejo-linux-cache",
Tag: "burrow-forgejo-linux-cache-v2",
MountPoint: c.Namespace.LinuxCachePath,
SizeGb: 40,
SizeGb: 80,
},
}
}

View file

@ -410,6 +410,8 @@ func appendVolumeArgs(args []string, volumes []CacheVolume) []string {
func (d *Dispatcher) bootstrapScript() string {
var builder strings.Builder
builder.WriteString(`set -euo pipefail
export HOME=/root
export USER=root
mkdir -p "${FORGEJO_RUNNER_WORKDIR:-/tmp/forgejo-runner}"
cd "${FORGEJO_RUNNER_WORKDIR:-/tmp/forgejo-runner}"
@ -437,6 +439,9 @@ if [ -f /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh ]; then
# shellcheck disable=SC1091
. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh
fi
export PATH="/nix/var/nix/profiles/default/bin:/nix/var/nix/profiles/default/sbin:${PATH}"
export NIX_CONFIG="experimental-features = nix-command flakes
accept-flake-config = true"
node --version >/dev/null
nix --version >/dev/null