diff --git a/modules/server/containers/apps/gitea.nix b/modules/server/containers/apps/gitea.nix index 2d49f3d..eaf97aa 100644 --- a/modules/server/containers/apps/gitea.nix +++ b/modules/server/containers/apps/gitea.nix @@ -141,9 +141,9 @@ in { PSQL="${pkgs.postgresql}/bin/psql -U postgres" TOKEN_STRING="$HOMEPAGE_VAR_GITEA_API" SALT=$(${pkgs.coreutils}/bin/cat /dev/urandom | ${pkgs.gnugrep}/bin/tr -dc 'a-zA-Z0-9' | ${pkgs.coreutils}/bin/head -c 10) - COMBINED_STRING="\${SALT}\${TOKEN_STRING}" + COMBINED_STRING="''${SALT}''${TOKEN_STRING}" HASH=$(echo -n "$COMBINED_STRING" | ${pkgs.openssl}/bin/openssl dgst -sha256 | ${pkgs.coreutils}/bin/cut -d' ' -f2) - LAST_8="\${TOKEN_STRING: -8}" + LAST_8="''${TOKEN_STRING: -8}" NOW=$(${pkgs.coreutils}/bin/date +%s) $PSQL -d "gitea_db" -e \ "INSERT INTO access_token (uid, name, token_hash, token_salt, token_last_eight, created_unix, updated_unix) \