Change update script runtime directory

This commit is contained in:
Nathan McCarty 2023-05-21 15:09:52 -04:00
parent 88ae9f4798
commit 96648a3736
Signed by: thatonelutenist
SSH Key Fingerprint: SHA256:hwQEcmak9E6sdU9bXc98RHw/Xd1AhpB5HZT7ZSVJkRM
2 changed files with 4 additions and 1 deletions

View File

@ -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";

View File

@ -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