Enable Nix and refresh linux cache volumes
This commit is contained in:
parent
0310ef17dc
commit
c47f0e6bea
5 changed files with 19 additions and 13 deletions
|
|
@ -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,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue