diff --git a/machines/oracles/automation.nix b/machines/oracles/automation.nix index 6669f69..3e60231 100644 --- a/machines/oracles/automation.nix +++ b/machines/oracles/automation.nix @@ -3,7 +3,7 @@ let repo-updater = pkgs.writeShellScriptBin "repo-updater" (builtins.readFile ../../scripts/gitea/update-repo.sh); environment = { - XDG_RUNTIME_DIR = "/tmp"; + XDG_RUNTIME_DIR = "/tmp/strangerbot"; HOME = "/home/strangerbot"; NIX_PATH = "nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos:nixos-config=/etc/nixos/configuration.nix:/nix/var/nix/profiles/per-user/root/channels"; diff --git a/scripts/gitea/update-repo.sh b/scripts/gitea/update-repo.sh index c06e496..9234c1d 100755 --- a/scripts/gitea/update-repo.sh +++ b/scripts/gitea/update-repo.sh @@ -1,6 +1,9 @@ #!/usr/bin/env bash set -exou pipefail +# Make sure our tmp directory exists +mkdir -p /tmp/strangerbot + TEMP_DIR=$(mktemp -d "repo-updater.XXXX" -p $XDG_RUNTIME_DIR) pushd $TEMP_DIR