diff --git a/services/forgejo-nsc/README.md b/services/forgejo-nsc/README.md index cdbb2bf..428ff27 100644 --- a/services/forgejo-nsc/README.md +++ b/services/forgejo-nsc/README.md @@ -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 diff --git a/services/forgejo-nsc/config.example.yaml b/services/forgejo-nsc/config.example.yaml index 15fe0a4..b45234f 100644 --- a/services/forgejo-nsc/config.example.yaml +++ b/services/forgejo-nsc/config.example.yaml @@ -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" diff --git a/services/forgejo-nsc/deploy/dispatcher.yaml b/services/forgejo-nsc/deploy/dispatcher.yaml index 1dc01b8..0f183e1 100644 --- a/services/forgejo-nsc/deploy/dispatcher.yaml +++ b/services/forgejo-nsc/deploy/dispatcher.yaml @@ -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" diff --git a/services/forgejo-nsc/internal/config/config.go b/services/forgejo-nsc/internal/config/config.go index 5750196..5ef8a7a 100644 --- a/services/forgejo-nsc/internal/config/config.go +++ b/services/forgejo-nsc/internal/config/config.go @@ -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, }, } } diff --git a/services/forgejo-nsc/internal/nsc/dispatcher.go b/services/forgejo-nsc/internal/nsc/dispatcher.go index 1bf339f..4a579a6 100644 --- a/services/forgejo-nsc/internal/nsc/dispatcher.go +++ b/services/forgejo-nsc/internal/nsc/dispatcher.go @@ -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